0

I am attempting to launch a mono program with systemctl. My .service looks like this:

[Unit]
Description=Starts results sender
After=network.target systemd.mount

[Service]
Type=forking
ExecStart=/usr/bin/mono /home/ubuntu/CameraInfoSender/CameraInfoSender.exe

,but it immediately exits with (code=exited, status=0/SUCCESS), before doing any work. This command works when launched manually. Adding Retart=on-success doesn't help, nor does WantedBy. Any help will be appreciated.

arvids
  • 184
  • 2
  • 11

1 Answers1

2

Check that you are using the appropriate Type=. The Type= options are documented in man systemd.service.

Also check the answer the FAQ of why things run in the shell but not via systemd.

Mark Stosberg
  • 12,961
  • 6
  • 44
  • 49