hi
why does systemd not restart a killed service if the "ExecStartPre"-process is
still running, see below - at my opinion after "killall afpd" the service
should be restarted and in a perfect case even if "ExecStartPre"-process dies
systemd-26-10.fc15.x86_64
___________________________
[root@testserver:~]$ cat /lib/systemd/system/netatalk.service
[Unit]
Description=Apple-File-Server
After=syslog.target network.target avahi-daemon.service
[Service]
Type=forking
PIDFile=/var/run/netatalk.pid
ExecStartPre=/usr/sbin/cnid_metad -l log_note
ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
[root@testserver:~]$ systemctl start netatalk.service
[root@testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-File-Server
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 28 Sep 2011 17:45:55 +0200; 3s ago
Process: 2000 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf (code=exited,
status=0/SUCCESS)
Process: 1997 ExecStartPre=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 1812 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netatalk.service
├ 1999 /usr/sbin/cnid_metad -l log_note
└ 2002 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf
[root@testserver:~]$ cat /var/run/netatalk.pid
2002
[root@testserver:~]$ killall afpd
[root@testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-File-Server
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 28 Sep 2011 17:45:55 +0200; 35s ago
Process: 2000 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf (code=exited,
status=0/SUCCESS)
Process: 1997 ExecStartPre=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 1812 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netatalk.service
└ 1999 /usr/sbin/cnid_metad -l log_note
[root@testserver:~]$ killall cnid_metad
[root@testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-File-Server
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 28 Sep 2011 17:46:39 +0200; 1s ago
Process: 2027 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf (code=exited,
status=0/SUCCESS)
Process: 2024 ExecStartPre=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 1812 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netatalk.service
├ 2026 /usr/sbin/cnid_metad -l log_note
└ 2029 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf