systemd
Különbségek
A kiválasztott változat és az aktuális verzió közötti különbségek a következők.
| Következő változat | Előző változat | ||
| systemd [2018/04/24 07:04] – létrehozva daevidt | systemd [2022/02/23 13:17] (aktuális) – daevidt | ||
|---|---|---|---|
| Sor 1: | Sor 1: | ||
| - | === /var/run persistency === | + | ==== Basic usage ==== |
| + | |||
| + | <code bash> | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ==== networkd ==== | ||
| + | |||
| + | Config files: | ||
| + | |||
| + | / | ||
| + | |||
| + | DNS=... | ||
| + | DHCP=.. | ||
| + | Gateway=.. | ||
| + | Address=.. | ||
| + | Domains=.. | ||
| + | ... | ||
| + | |||
| + | Check **man systemd.network** | ||
| + | |||
| + | ==== tmpfiles.d, | ||
| With the adoption of systemd, there is now a centralized mechanism for the creation of temporary files and directories. A service wishing to use this method can remove mkdir commands in its own startup script and instead place a .conf file in **/ | With the adoption of systemd, there is now a centralized mechanism for the creation of temporary files and directories. A service wishing to use this method can remove mkdir commands in its own startup script and instead place a .conf file in **/ | ||
| Sor 10: | Sor 35: | ||
| L / | L / | ||
| </ | </ | ||
| + | |||
| + | Further information can be found using **man tmpfiles.d** | ||
| + | |||
| + | ==== Init scripts ==== | ||
| + | |||
| + | Init scripts are located here: | ||
| + | |||
| + | / | ||
| + | / | ||
| + | ... | ||
| + | |||
| + | Example init scripts: | ||
| + | |||
| + | <code bash> | ||
| + | [Unit] | ||
| + | Description=Calibre Server | ||
| + | After=network.target | ||
| + | |||
| + | StartLimitIntervalSec=500 | ||
| + | StartLimitBurst=5 | ||
| + | |||
| + | [Service] | ||
| + | Type=forking | ||
| + | PIDFile=/ | ||
| + | Restart=on-failure | ||
| + | RestartSec=5s | ||
| + | ExecStart=/ | ||
| + | --daemonize \ | ||
| + | --port 32452 \ | ||
| + | --pidfile / | ||
| + | --enable-local-write \ | ||
| + | --log=/ | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | |||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | [Unit] | ||
| + | Description=Calibre Book Importer | ||
| + | After=network.target calibre.service | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=/ | ||
| + | KillMode=mixed | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | |||
| + | </ | ||
| + | === Types === | ||
| + | * forking | ||
| + | * oneshot | ||
| + | * ... | ||
| + | |||
| + | # TODO!!! | ||
| + | |||
| + | === Reload init scripts config === | ||
| + | |||
| + | systemctl daemon-reload | ||
systemd.1524553442.txt.gz · Utolsó módosítás: 2018/10/03 13:31 (külső szerkesztés)
