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.

47 lines
728 B

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