You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 regels
711 B

  1. #!/bin/bash
  2. # Allo-GG
  3. # Demarrage du module apres les services :
  4. while ! apache2 -v | head -n 1 | grep -q 'Server version: Apache/[0-9]'; do
  5. sleep 5
  6. done
  7. while ! gpio -v | head -n 1 | grep -q 'gpio version: [0-9]'; do
  8. sleep 5
  9. done
  10. while ! /sbin/ifconfig wlan0 | grep -q 'inet [0-9]'; do
  11. sleep 5
  12. done
  13. # Declarations des GPIO :
  14. # PIN 7 (Porte)
  15. sleep 1
  16. gpio -g write 4 1
  17. sleep 1
  18. gpio -g mode 4 out
  19. # PIN 11 (Sonette)
  20. sleep 1
  21. gpio -g write 17 1
  22. sleep 1
  23. gpio -g mode 17 out
  24. # PIN 12 (LED VERTE D'ETAT)
  25. sleep 1
  26. gpio -g write 18 1
  27. sleep 1
  28. gpio -g mode 18 out
  29. sleep 1
  30. gpio -g write 18 0
  31. sleep 1
  32. # Lancement de la premiere verification des services :
  33. /bin/bash /var/www/html/scripts/check_services.sh &
  34. exit