rc.local 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh -e
  2. #
  3. # rc.local
  4. #
  5. # Copyright (c) 2019 Clementine Computing LLC.
  6. #
  7. # This file is part of PopuFare.
  8. #
  9. # PopuFare is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU Affero General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # PopuFare is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU Affero General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU Affero General Public License
  20. # along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  21. #
  22. /home/bus/bin/setup-serial.py >> /tmp/init.log 2>&1
  23. sleep 2
  24. /home/bus/bin/get_net_ids.sh >> /tmp/init.log 2>&1
  25. sleep 2
  26. ip link set eth0 down
  27. /home/bus/bin/connection_tether.sh >> /tmp/tether.log 2>&1 &
  28. sleep 2
  29. /home/bus/bin/update_loop.sh >> /tmp/run.log 2>&1 &
  30. sleep 2
  31. /home/bus/bin/reset-gps >> /tmp/gps.log 2>&1 &
  32. sleep 2
  33. ## If using HDMI sound, uncomment the following two lines...
  34. ##
  35. vcgencmd force_audio hdmi 1 >> /tmp/audio.log 2>&1 &
  36. sleep 1
  37. # for some reason 'start-kiosk.sh' is having trouble starting without the 'su'
  38. #
  39. ( sleep 5 && su -c " /usr/bin/startx /home/bus/bin/start-kiosk.sh >> /tmp/kiosk.log 2>&1" ) &
  40. exit 0