From: Lennart Poettering Date: Fri, 9 Jul 2010 22:49:00 +0000 (+0200) Subject: man: update daemon man page a little X-Git-Tag: v3~68 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=828f33e89bc2fa7ee9bc9f977c04d0e30336d848;hp=83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4 man: update daemon man page a little --- diff --git a/fixme b/fixme index d05d0a3a6..37c6288d7 100644 --- a/fixme +++ b/fixme @@ -35,16 +35,14 @@ * selinux -* .socket should refuse start when .service is already up to avoid overwriting the socket - * introduce umount.target * pull in umount.target and shutdown.target from emergency.service (?) -* extend recommendations to depend on syslog.target via "After" - * Don't show Accepted/Connected for non-Accept sockets +* Show exit status auf auxiliary programs in systemctl status + External: * patch /etc/init.d/functions with: diff --git a/man/daemon.xml b/man/daemon.xml index b708bdcfb..fb22e6c61 100644 --- a/man/daemon.xml +++ b/man/daemon.xml @@ -678,7 +678,8 @@ If your daemon registers a D-Bus name on the bus, make sure to use - Type=dbus if + Type=dbus in the + service file if possible. Make sure to set a @@ -703,16 +704,45 @@ operating system-independent. + Since not all syslog + implementations are socket-activatable + yet, it is recommended to place an + After=syslog.target + dependency in service files for + daemons that can log to + syslog. syslog.target + then either pulls in the syslog daemon + itself or simply the activation + socket. A Wants= or + even Requires= + dependency should generally not be + added, since it should be up to the + administrator whether he wants to + enable logging or not, and most syslog + clients work fine if no log daemon is + running. + Make sure to include - an [Install] section including - installation information for the unit - file. See + an [Install] + section including installation + information for the unit file. See systemd.unit5 for details. To activate your service on boot make sure to add a WantedBy=multi-user.target or - WantedBy=graphical.target directive. + WantedBy=graphical.target + directive. To activate your socket on + boot, make sure to add + WantedBy=sockets.target. Usually + you also want to make sure that when + your service is installed your socket + is installed too, hence add + Also=foo.socket in + your service file + foo.service, for + a hypothetical program + foo. @@ -800,6 +830,15 @@ if [ "$1" -eq 0 ]; then /usr/bin/systemd-install --realize disable foobar.service foobar.socket >/dev/null 2>&1 || : fi + Depending on whether your service should + or should not be started/stopped/restarted + during package installation, deinstallation or + upgrade, a different argument to + may be + specified. See + systemd-install1 + for details. +