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 [2017/12/28 23:05] – [Modificare Ctrl-Alt-Del con Systemd] niccolo | doc:appunti:linux:sa:systemd [2023/12/13 12:37] (current) – [Alternatriva allo script rc.local] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Systemd ====== | ====== Systemd ====== | ||
+ | **[[wp> | ||
===== Comandi di servizio ===== | ===== Comandi di servizio ===== | ||
- | Quando si modifica qualche file di configurazione (ad esempio gli script | + | Quando si modifica qualche file di configurazione (ad esempio gli //unit files// |
< | < | ||
Line 143: | Line 144: | ||
Non è necessario modificare il contenuto di questa directory, si può fare un override creando il link simbolico opportuno nella directory **/ | Non è necessario modificare il contenuto di questa directory, si può fare un override creando il link simbolico opportuno nella directory **/ | ||
- | ===== Riferimenti web ===== | + | ===== Timeout in attesa di un device |
+ | Può capitare che il processo di **bootstrap fallisce** perché un device elencato in **/ | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===== 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 | ||
+ | </ | ||
+ | |||
+ | ===== 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 ===== | ||
* **[[https:// | * **[[https:// | ||
Understanding Systemd Units and Unit Files]]** | Understanding Systemd Units and Unit Files]]** | ||
* **[[https:// | * **[[https:// |
doc/appunti/linux/sa/systemd.txt · Last modified: 2023/12/13 12:37 by niccolo