I have written an upstart script called 'ts.conf' for a daemon and put it in /etc/init. When I try to start it with
start ts
I expect a confirmation message and I also expect to get the prompt back, but the terminal hangs. When I hit ctrl-c I get the prompt back. If I start again a message says
start: Job is already running: ts
The server is, however, not running, and I can find the mono process using 'ps -ef'.
The script 'ts.conf' is located in /etc/init and looks like this:
start on runlevel [2345]
stop on runlevel [016]
respawn
expect fork
script
cd /home/ubuntu/Terraria
/usr/bin/mono /home/ubuntu/Terraria/TerrariaServer.exe -worldpath /home/ubuntu/Terraria -world world1.wld
end script
The server starts fine if I run the command manually from the command prompt. Can anybody see what is wrong with my upstart script, or understand why nothing seems to happen?
Please not that the text above is WRONG when it says that I can find the process with ps -ef. I CAN NOT find the process using ps.