I am trying to get god to start during boot on Debian. I added a script to the /etc/init.d/ directory which looks like this.
#!/usr/bin/sh
### BEGIN INIT INFO
# Provides: god
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start god process monitoring
# Description: Start god process monitoring
### END INIT INFO
god_conf="absolute/path/to/god.conf"
god_pid_file="/var/run/god/god.pid" ; mkdir -p `dirname $god_pid_file`
god_log_file="/var/log/god/god.log" ; mkdir -p `dirname $god_log_file`
case "$1" in
start)
god -c "$god_conf" -P "$god_pid_file" -l "$god_log_file"
RETVAL=$?
echo "God started"
;;
...
I ran the following command to create the necessary symbolic links sudo update-rc.d god defaults
However, when I reboot the machine, god does not seem to get started. My question is, how can I debug this problem?
I have looked at dmesg and don't see anything related to god. I have also looked at the syslog and didn't see anything there. Also, the god.log file is empty and there is no god.pid file.
I don't know if the problem is that my init script is not even getting called or if it is failing when it tries to start god. I have tried starting god manually by running sudo /etc/init.d/god start and that seems to work fine. Any ideas?
exec > /var/log/god/initlog 2>&1as the first statement after themkdirs, so you can see exactly what's going on.ls -l /etc/rc.d/*god.mkdirsls -l /etc/rc.d/*godand get an error sayingcannot access /etc/rc.d/*god: No such file or directory. Withink /etc/ there is no rc.d directory, however it does have the following directoriesrc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rcS.d/ls -l /etc/rc?.d/*god— but in fact your problem is presumably the bad shebang line that I spotted afterwards.