How to convert my program into a service?
Bo Berglund
bo.berglund at gmail.com
Tue Mar 30 09:48:40 UTC 2021
On Tue, 30 Mar 2021 10:02:15 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:
>Is there a authoritative howto document which describes how this should be done
>including where to put which files?
I'd probably rephrase that as:
Is there a simple "for dummies" howto document...
Anyway I have waded through a lot of google suggestions and then found this,
which seems to be good enough while not throwing me off a cliff...
https://www.howtogeek.com/687970/how-to-run-a-linux-program-at-startup-with-systemd/
I will do some trial-and-error tests using this and see where I get.
My application spawns a number of threads so I guess I have to use this:
[Service]
KillMode=mixed
OTOH, when I run the program from the command line I can shut it down using
Ctrl-C in the terminal.
Or using kill -9 <pi< from another terminal.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list