burrow-pi-img/stage2/06-dride-base/files/etc_initd_dride-core

43 lines
1.0 KiB
Bash

#! /bin/sh
# /etc/init.d/dride-core
### BEGIN INIT INFO
# Provides: dride-core
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: will run the main dride-core process
# Description:
### END INIT INFO
case "$1" in
start)
echo "Starting dride-core"
#blink LED
sudo python /home/Cardigan/modules/indicators/python/states/standalone.py welcome
# decode undecoded clips on startup
sudo node /home/Cardigan/modules/video/helpers/ensureAllClipsAreDecoded.js &
# start recording
sudo node /home/Cardigan/modules/video/index.js &
# run button / bluetooth daemon
sudo python /home/Cardigan/daemons/bluetooth/initPin.py &
sudo BLENO_DEVICE_NAME="dride" node /home/Cardigan/daemons/bluetooth/main.js &
;;
stop)
echo "Stopping dride-core"
# kill application you want to stop
killall python
;;
*)
echo "Usage: /etc/init.d/dride-core{start|stop}"
exit 1
;;
esac
exit 0