46 lines
1.1 KiB
Bash
46 lines
1.1 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 "Setting up HwClock"
|
|
sudo hwclock -s
|
|
|
|
echo "Starting dride-core"
|
|
#blink LED
|
|
sudo python /home/core/modules/indicators/python/states/standalone.py welcome
|
|
|
|
# decode undecoded clips on startup
|
|
sudo node /home/core/modules/video/helpers/ensureAllClipsAreDecoded.js &
|
|
|
|
# start recording
|
|
sudo node /home/core/modules/video/index.js &
|
|
|
|
# run button / bluetooth daemon
|
|
sudo python /home/core/daemons/bluetooth/initPin.py &
|
|
sudo BLENO_DEVICE_NAME="dride" node /home/core/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
|