I used this upstart in ubuntu 14.04 and it worked perfectly fine:
start on runlevel  respawn script cd /media/sf_ACEBot exec /usr/bin/mono /media/sf_ACEBot/ACE\ Bot.exe >> /media/sf_ACEBot/log.txt end script
Now I want to have the same thing in ubuntu 16.04 but in systemd. I have written the service below:
[Service] WorkingDirectory=/media/sf_ACEBot ExecStart=/usr/bin/mono /media/sf_ACEBot/ACe\ Bot.exe [Install] WantedBy=multi-user.target
There are two problems:
- How can I redirect the output? the >> mark does not work.
- When I start the service, it waits for my exec to stop. I mean I can only press Ctl+C which stops my service.
Please help me to fix my systemd.