3

I used this upstart in ubuntu 14.04 and it worked perfectly fine:

start on runlevel [2345]
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:

  1. How can I redirect the output? the >> mark does not work.
  2. 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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.