[systemd-devel] [Netatalk-admins] Restart=always and "ExecStartPre" (netatalk)
HAT
hat at fa2.so-net.ne.jp
Wed Nov 2 07:48:26 PDT 2011
From: Reindl Harald <h.reindl at thelounge.net>, Tue, 01 Nov 2011 16:13:13 +0100
> until now i found no suiteable way except my A version
> to make sure that i can start and stop netatalk full
> funtionally with one command
It seems to be possible with one command.
# systemctl start netatalk-cnid_metad.service netatalk-afpd.service
# cat netatalk-cnid_metad.service
[Unit]
Description=Netatalk CNID database daemon for afpd
After=syslog.target network.target
[Service]
Type=forking
GuessMainPID=no
Environment="CNID_CONFIG=-l log_note"
EnvironmentFile=/etc/netatalk/netatalk.conf
ExecStart=/usr/sbin/cnid_metad $CNID_CONFIG
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
# cat netatalk-afpd.service
[Unit]
Description=Netatalk AFP fileserver for Macintosh clients
After=syslog.target network.target slpd.service avahi-daemon.service netatalk-cnid_metad.service
[Service]
Type=forking
GuessMainPID=no
ExecStart=/usr/sbin/afpd
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
--
HAT
More information about the systemd-devel
mailing list