- Code: Select all
## BEGIN INIT INFO
# Provides: superHouse
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
#Default-Stop: 0 1 6
### END INIT INFO
#! /bin/sh
# /etc/init.d/superhouse
case "$1" in
start)
sudo python /home/pi/superHouse.py
echo "Superhouse Started"
;;
stop)
echo "Power Down"
exit 1
;;
*)
echo "Power Down"
exit 1
;;
esac
exit 0
I changed permissions of the file
- Code: Select all
sudo chmod 755 superhouse
ran updaterc.d
- Code: Select all
sudo updaterc.d superhouse defaults
I had a bunch of errors that I got rid of by removing all of the spaces and indentation in the script (Why?)
The only error that I have left is :
- Code: Select all
insserv: warning: current start runlevel(s) (empty) of script 'superhouse' overrides LSB defaults (2 3 4 5).
Upon doing some poking around, I found that there are no start up scripts in any of the rcx.d folders. There are some kill files though. That being said, the "Power Down" message is shown on reboot and shutdown. But the "Superhouse Started" is not printed on startup, nor is the script, superhouse.py, executed.
Thanks in advance for your help