For the life of me, I cannot get this to work. I'm running Debian on Raspberry Pi.
running this command from CLI:
/home/pi/domotiga/DomotiGaServer.gambas -d
runs my home automation server.
How do I go about running this on boot?
I have a file in my /etc/init.d dir that does get loaded, but it doesn't launch the server
file contents:
#!/bin/bash
### BEGIN INIT INFO
# Provides: domotigaserver
# Required-Start: $syslog $mysql
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: domotiga server
# Description:
#
### END INIT INFO
#!/bin/bash
# /etc/init.d/domotigaserver
#
# Carry out specific functions when asked to by the system
case "$1" in
start)
su pi -c '/home/pi/domotiga/DomotiGaServer.gambas -d'
echo "Starting DomotiGa Server "
;;
stop)
pkill DomotiGaServer.gambas
echo "DomotiGa Server has been stopped (didn't double check though)"
;;
*)
echo "Usage: /etc/init.d/domotigaserver {start|stop}"
exit 1
;;
esac
exit 0