Systemd recipe for simple daemons
In the previous post we discussed about upstart job files. In this post will do the same with Sytemd.
If your daemon honours the same conditions of the previous post:
- don’t fork;
- can simply been stopped by a SIGSTOP
- logs to the console;
then systemd calls that daemons “simple”, and you should create a simple systemd unit file like this:
You should place this file in /usr/lib/systemd/system with name [daemonname].service. Now you can use the following commands:
If you want your service to be started in the boot process you can use this command:
Systemd, from this point of view, is simple and easy.