[systemd-devel] Binary launched in ExecStartPre gets killed...
Reindl Harald
h.reindl at thelounge.net
Mon Mar 4 07:33:45 PST 2013
Am 04.03.2013 16:25, schrieb Belal:
> So how do i write such a service i.e. when A starts B should be started first and when A is stopped B should be stopped as well. I am really new to this so any pointers here would be really helpful. I understand that this is a very basic question but I am very new to this...
make a own service
[root at fileserver:~]$ cat /etc/systemd/system/netatalk.service
[Unit]
Description=Apple-Fileserver
After=avahi-daemon.service
[Service]
Type=forking
GuessMainPID=no
EnvironmentFile=-/etc/netatalk/systemd-env
ExecStartPre=/bin/systemctl start netatalk-cnid.service
ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U uams_dhx.so,uams_dhx2.so -g nobody
-c 100 -nozeroconf
ExecStopPost=/bin/systemctl stop netatalk-cnid.service
Restart=always
RestartSec=1
PrivateTmp=true
CapabilityBoundingSet=~CAP_SYS_PTRACE
[Install]
WantedBy=multi-user.target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130304/01cf55c7/attachment.pgp>
More information about the systemd-devel
mailing list