rc.local 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. export LOGDIR=/home/bus/log
  23. /home/bus/bin/ipc_server > $LOGDIR/ipc_server.log &
  24. /home/bus/bin/rfid_manager > $LOGDIR/rfid_manager.log &
  25. /home/bus/bin/magstripe_manager > $LOGDIR/mag_manager.log &
  26. /home/bus/bin/qr_manager > $LOGDIR/qr_manager.log &
  27. motion -b -c /home/bus/.motion/motion.conf -p $LOGDIR/motion.pid -l $LOGDIR/motion.log 2>> $LOGDIR/init.log
  28. /home/bus/bin/piumsgd > $LOGDIR/piumsgd.log &
  29. /home/bus/bin/piufared > $LOGDIR/piufared.log &
  30. socat -d -d pty,raw,echo=0,link=/tmp/ttyPIUich pty,raw,echo=0,link=/dev/ttyPIU > $LOGDIR/socat.log &
  31. sleep 1
  32. /home/bus/bin/ichthyic-passthrough -i /tmp/ttyPIUich -I /dev/i2c-1 > $LOGDIR/ichthyic.log &
  33. ( sleep 5 && su -c "/usr/bin/startx /home/bus/popufare/busunit-PIU/scripts/piu_kiosk 2>&1 $LOGDIR/kiosk.log" ) &
  34. #( sleep 5 && su -c "/usr/bin/startx /home/bus/bin/piu_wrapp 2>&1 /tmp/piu_wrapp.log" ) &
  35. exit 0