X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Fdaemon.xml;h=fb22e6c6165d88f4d950542fba0e7a37baf0d25a;hp=b708bdcfbaae0386342606aa6044c6fc76c4df68;hb=828f33e89bc2fa7ee9bc9f977c04d0e30336d848;hpb=83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4;ds=sidebyside 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. +