[systemd-devel] [Netatalk-admins] netatalk: afpd/cnid service
Reindl Harald
h.reindl at thelounge.net
Wed Oct 19 07:38:09 PDT 2011
Am 12.10.2011 15:57, schrieb Frank Lahm:
>> My problem is that i did not get "cnid_metad" started as a own
>> service, i tried Type=simple and Type=forked, it will be started
>> and somehow the process closed without any error
>>
>> seems like a bug in netatalk
>
> Guess not. According to
> <http://0pointer.de/public/systemd-man/systemd.service.html> it's
> Type=forking, not Type=forked.
> Of course cnid_metad daemonizes. Also I'd utilize PIDFile=... .
well, starting "netatalk-cnid.service" alone works
but if i try to start it directly before "netatalk.service" it
is dying silently with statuscode 0
below my two service-files and systemcl-outputs
restarting "netatalk-cnid.service" after "netatalk.service" results in
started and ended after a moment - something is going terrible wrong
________________________________________
[Unit]
Description=Apple-Fileserver
After=avahi-daemon.service
[Service]
Type=forking
PIDFile=/var/run/netatalk.pid
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
ExecStartPost=/bin/systemctl stop netatalk-cnid.service
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
[Unit]
Description=Netatalk CNID
[Service]
Type=forking
ExecStart=/usr/sbin/cnid_metad -l log_note
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
________________________________________
[root at testserver:~]$ systemctl restart netatalk-cnid.service
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: activating (auto-restart) since Wed, 19 Oct 2011 16:34:09 +0200; 928ms ago
Process: 2387 ExecStart=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 2388 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netatalk-cnid.service
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: inactive (dead)
CGroup: name=systemd:/system/netatalk-cnid.service
________________________________________
[root at testserver:~]$ systemctl start netatalk-cnid.service
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: active (running) since Wed, 19 Oct 2011 16:18:42 +0200; 1s ago
Process: 2258 ExecStart=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 2260 (cnid_metad)
CGroup: name=systemd:/system/netatalk-cnid.service
└ 2260 /usr/sbin/cnid_metad -l log_note
[root at testserver:~]$ systemctl stop netatalk-cnid.service
[root at testserver:~]$ systemctl start netatalk.service
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: inactive (dead)
CGroup: name=systemd:/system/netatalk-cnid.service
[root at testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-Fileserver
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 19 Oct 2011 16:18:57 +0200; 9s ago
Process: 2277 ExecStartPost=/bin/systemctl stop netatalk-cnid.service (code=exited, status=0/SUCCESS)
Process: 2274 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U
uams_dhx.so,uams_dhx2.so -g nobody (code=exited, status=0/SUCCESS)
Process: 2268 ExecStartPre=/bin/systemctl start netatalk-cnid.service (code=exited, status=0/SUCCESS)
Main PID: 2276 (afpd)
CGroup: name=systemd:/system/netatalk.service
└ 2276 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U uams_dhx.so,uams_dh...
[root at testserver:~]$ systemctl restart netatalk.service
[root at testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-Fileserver
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 19 Oct 2011 16:19:28 +0200; 3s ago
Process: 2295 ExecStartPost=/bin/systemctl stop netatalk-cnid.service (code=exited, status=0/SUCCESS)
Process: 2292 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U
uams_dhx.so,uams_dhx2.so -g nobody (code=exited, status=0/SUCCESS)
Process: 2286 ExecStartPre=/bin/systemctl start netatalk-cnid.service (code=exited, status=0/SUCCESS)
Main PID: 2294 (afpd)
CGroup: name=systemd:/system/netatalk.service
└ 2294 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U uams_dhx.so,uams_dh...
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: inactive (dead)
CGroup: name=systemd:/system/netatalk-cnid.service
[root at testserver:~]$ systemctl restart netatalk.service
[root at testserver:~]$ systemctl status netatalk.service
netatalk.service - Apple-Fileserver
Loaded: loaded (/lib/systemd/system/netatalk.service)
Active: active (running) since Wed, 19 Oct 2011 16:32:40 +0200; 5s ago
Process: 2360 ExecStartPost=/bin/systemctl stop netatalk-cnid.service (code=exited, status=0/SUCCESS)
Process: 2357 ExecStart=/usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U
uams_dhx.so,uams_dhx2.so -g nobody (code=exited, status=0/SUCCESS)
Process: 2351 ExecStartPre=/bin/systemctl start netatalk-cnid.service (code=exited, status=0/SUCCESS)
Main PID: 2359 (afpd)
CGroup: name=systemd:/system/netatalk.service
└ 2359 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U uams_dhx.so,uams_dh...
-------------- 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/20111019/cd36a897/attachment.pgp>
More information about the systemd-devel
mailing list