FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-28-2011, 03:49 PM
Reindl Harald
 
Default Restart=always and "ExecStartPre"

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

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 01:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org