Systemd is a Linux system tool which can be used to start, schedule, monitor, manage system processes and customer applications. I used systemd while configuring my minimal Debian application and run some application upon OS bootup and manage the lifecycle of applications.
This blog can guides you through some of the basics of systemd services.
Create a Custom systemd Service (Use HelloWorld as an example)
- Create a script or executable that the service will manage.
1 |
|
- Make it executable.
1 | [sudo] chmod +x /home/structo/test_service.sh |
- Create Service file.
1 | #Path: /lib/systemd/system/myservice.service |
- Start and enable the service.
1 | # reload systemd service after editing |