I've added a new script to /etc/init/ called minecraft.conf which contains the script:
start on startup
stop on shutdown
respawn
respawn limit 20 5
script
export HOME="/root"
exec /root/minecraft/start.sh 2>&1 >> /var/log/minecraft.log
end script
post-start script
echo "minecraft started"
When I try start minecraft I get the error: start: Unknown job: minecraft
I've tried running initctl list and my minecraft job is not listed. I've tried running initctl reload-configuration and it doesn't make any difference.
Other jobs listed by initctl list work fine with start, stop and restart.
Why won't upstart see my new script?
/etc/init.d/? – Wolfer Jan 24 '13 at 17:09/etc/initand now you're ready to reboot and use upstart." – Jasarien Jan 24 '13 at 17:20sudo start minecraftwithout a problem.Here is content of the log file
– Goran Miskovic Jan 24 '13 at 19:10~$ sudo cat /var/log/upstart/minecraft.log minecraft started /proc/self/fd/9: 3: exec: /root/minecraft/start.sh: not found minecraft startedCan you provide more details on Ubuntu version you are using and any useful information from syslog?