[systemd-devel] [Netatalk-admins] Restart=always and "ExecStartPre" (netatalk)

HAT hat at fa2.so-net.ne.jp
Tue Nov 1 08:08:25 PDT 2011


Which is more suitable between A) and B) ? 

A)
[Unit]
Description=XXX
[Service]
Type=forking
GuessMainPID=no
ExecStartPre=/bin/systemctl start netatalk-cnid.service
ExecStart=/usr/sbin/afpd
ExecStopPost=/bin/systemctl stop netatalk-cnid.service
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target


B)
[Unit]
Description=XXX
After=netatalk-cnid.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