doc:appunti:linux:sa:systemd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:linux:sa:systemd [2018/05/23 12:03] – [Timeout in attesa di un device] niccolo | doc:appunti:linux:sa:systemd [2023/12/13 12:36] – [Sostituto di rc.local] niccolo | ||
---|---|---|---|
Line 152: | Line 152: | ||
</ | </ | ||
+ | ===== Verifica Servizi ===== | ||
+ | |||
+ | Alcuni comandi utili per **verificare il funzionamento** dei servizi gestiti da **systemd**. | ||
+ | |||
+ | Mostra lo stato di tutti i **servizi** e di tutte le **unit**: | ||
+ | |||
+ | < | ||
+ | systemctl --all --full status | ||
+ | </ | ||
+ | |||
+ | Mostra le **unit** // | ||
+ | |||
+ | < | ||
+ | systemctl --all list-dependencies ntp.service | ||
+ | </ | ||
+ | |||
+ | ===== Alternatriva allo script rc.local ===== | ||
+ | |||
+ | Come eseguire uno script all' | ||
+ | |||
+ | Creare una unit Systemd **/ | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | # | ||
+ | # Service executed once the system has reached the multi-user status. | ||
+ | # | ||
+ | # Type=oneshot | ||
+ | # RemainAfterExit=yes | ||
+ | # when all its processes exited. | ||
+ | # | ||
+ | # Eanble the service with: | ||
+ | # | ||
+ | |||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Abilitare la unit e predisporre lo script **/ | ||
===== Riferimenti web ===== | ===== Riferimenti web ===== |
doc/appunti/linux/sa/systemd.txt · Last modified: 2023/12/13 12:37 by niccolo