doc:appunti:linux:sa:systemd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:systemd [2018/10/08 12:56] – [Timeout in attesa di un device] niccolo | doc:appunti:linux:sa:systemd [2023/12/13 12:37] (current) – [Alternatriva allo script rc.local] niccolo | ||
---|---|---|---|
Line 156: | Line 156: | ||
Alcuni comandi utili per **verificare il funzionamento** dei servizi gestiti da **systemd**. | Alcuni comandi utili per **verificare il funzionamento** dei servizi gestiti da **systemd**. | ||
- | Mostra lo stato di tutti i servizi e di tutte le unit | + | Mostra lo stato di tutti i **servizi** e di tutte le **unit**: |
< | < | ||
Line 162: | Line 162: | ||
</ | </ | ||
- | Mostra le unit // | + | Mostra le **unit** // |
< | < | ||
systemctl --all list-dependencies ntp.service | systemctl --all list-dependencies ntp.service | ||
</ | </ | ||
+ | |||
+ | ===== Alternativa 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.1538996178.txt.gz · Last modified: 2018/10/08 12:56 by niccolo