Difference between revisions of "Systemd debian"
From Teknologisk videncenter
m |
m (→Writingt your own systemd services) |
||
Line 19: | Line 19: | ||
=Writingt your own systemd services= | =Writingt your own systemd services= | ||
*See [https://man7.org/linux/man-pages/man7/daemon.7.html man page daemon(7)] | *See [https://man7.org/linux/man-pages/man7/daemon.7.html man page daemon(7)] | ||
+ | *[https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6 Creating a Linux service with systemd] | ||
+ | |||
=Links= | =Links= | ||
*https://www.linux.com/training-tutorials/understanding-and-using-systemd/ | *https://www.linux.com/training-tutorials/understanding-and-using-systemd/ |
Revision as of 07:31, 6 November 2023
- Scriptfiles in /lib/systemd/system - See exampels of servicefiles there - add your own new system service:
...:~$ sudo systemd-analyze verify YOUR_SERVICEFILE
...:~$ sudo systemctl daemon-reload
...:~$ sudo systemctl enable YOUR_SERVICEFILE
...:~$ sudo systemctl YOUR_SERICEFILE
Often used
# systemctl start [name.service]
# systemctl stop [name.service]
# systemctl restart [name.service]
# systemctl reload [name.service]
$ systemctl status [name.service]
# systemctl is-active [name.service]
$ systemctl list-units --type service --all
$ systemctl show [name.service]
Writingt your own systemd services
Links
- https://www.linux.com/training-tutorials/understanding-and-using-systemd/
- https://learning.oreilly.com/library/view/exploring-beaglebone-2nd/9781119533160/c15.xhtml (Godt eksempel)
- debian.org Create Service
- Eksempel på service lavet i PHP
- systemd services - noget dybere
- Video training - systemd i dybden