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@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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to