Difference between revisions of "Systemd debian"

From Teknologisk videncenter
Jump to: navigation, search
m (Writingt your own systemd services)
m
Line 16: Line 16:
 
$ systemctl list-units --type service --all
 
$ systemctl list-units --type service --all
 
$ systemctl show [name.service]
 
$ systemctl show [name.service]
 +
</source>
 +
=Dependencies=
 +
 +
<source lang=bash>
 +
systemctl list-dependencies
 
</source>
 
</source>
 
=Writingt your own systemd services=
 
=Writingt your own systemd services=

Revision as of 09:27, 8 March 2024

  • 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]

Dependencies

systemctl list-dependencies

Writingt your own systemd services

Links