Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (32 sloc) 760 Bytes
#! /bin/sh
# /etc/init.d/tinaja_sensors
### BEGIN INIT INFO
# Provides: tinaja_sensors
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Tinaja_Sensors initialisation
### END INIT INFO
PIDFILE=/var/run/tinaja_sensors.pid
case "$1" in
start)
echo "Starting Tinaja_Sensors"
# run application you want to start
python /home/tinaja/sensorgate2.py &
;;
stop)
echo "Stopping Tinaja_Sensors"
# kill application you want to stop
killall python
;;
restart)
echo "Restarting Tinaja_Sensors.."
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/tinaja_sensors start|stop"
exit 1
;;
esac