Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:systemd_service_unit_files

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
admin_grundlagen:systemd_service_unit_files [2018/08/16 10:08]
ingo_wichmann
admin_grundlagen:systemd_service_unit_files [2025/09/02 13:23] (aktuell)
ingo_wichmann
Zeile 8: Zeile 8:
 ExecStart=/​usr/​bin/​nc -l -p 5000 ExecStart=/​usr/​bin/​nc -l -p 5000
 </​file>​ </​file>​
 +
 +((
 +Lennart Poettering [[https://​mastodon.social/​@pid_eins/​115128485057447501|schreibt]] auf die Frage, warum alle Netzwerkdienste Socket Activation nutzen sollten:
 +"​robustness (because your service can go away, and then get restarted without clients noticing much), security (because priv code in pid1 binds the socket, and service can be entirely unpriv), resource use (because you can bind thousands of sockets, without having to pay upfront for starting the services behind), flexibility (because admins can configure .socket units in a *lot* of detail, and schedule binding of sockets precisely, for example bind certain IP sockets only after some network interface showed up and has been configured),​ simplicity (because as mentioned you don't need to configure deps anymore), compatibility with soft-reboot,​ … and the list goes on and on and on and on…"
 +
 +))
  
 Syntax des Unit Files prüfen: Syntax des Unit Files prüfen:
Zeile 48: Zeile 54:
  
   systemctl enable nc   systemctl enable nc
 +
 +Nach beendeter Verbindung neustarten:
 +
 +<file txt /​etc/​systemd/​system/​nc.service>​
 +
 +
 +[Service]
 +
 +Restart=always
 +</​file>​
  
 ====== Beispiel für ein User Service Unit ====== ====== Beispiel für ein User Service Unit ======
admin_grundlagen/systemd_service_unit_files.1534414095.txt.gz · Zuletzt geändert: 2018/08/16 10:08 von ingo_wichmann