#! /bin/sh

### BEGIN INIT INFO
# Provides: start_feedbackd
# Required-Start: 
# Required-Stop: 
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts python feedback software 
# Description: Starts the python feedback software in background as a daemon
### END INIT INFO

case "$1" in
start)
echo "Starting feedback module"
sudo /usr/bin/python /home/pi/feedback.py &
;;
stop)
echo "Stopping feedback module"
killall python
;;
*)
echo "Usage: /etc/init.d/start_feedbackd {start|stop}"
exit 1
;;
esac

