When we want to create a daemon out or a program, so it is managed by "systemd", we follow the below steps.
We start by creating a simple "systemd" unit file for our program:
We then copy our unit file into the "/usr/lib/systemd/system" directory:
Then we reload the systemd, so that the new service is included:
We start our daemon using the below command:
We could check the status of the service using the below command:
To enable our service so it starts after each reboot, we use the below command:
Comments