[systemd-devel] [Netatalk-admins] Restart=always and "ExecStartPre" (netatalk)
Reindl Harald
h.reindl at thelounge.net
Tue Nov 1 08:13:13 PDT 2011
for most users B
but if i say "systemctl stop netatalk.service" for
whatever reason (dbd -r e as example) cnid is running
so you have to stop both manually
if you start netatalk.service after that it will not
start the cnid-daemen
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
Am 01.11.2011 16:08, schrieb HAT:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20111101/81b5d346/attachment.pgp>
More information about the systemd-devel
mailing list