[systemd-devel] [Netatalk-admins] netatalk: afpd/cnid service
Reindl Harald
h.reindl at thelounge.net
Wed Oct 19 08:20:16 PDT 2011
Am 19.10.2011 17:06, schrieb Frank Lahm:
> 2011/10/19 Reindl Harald <h.reindl at thelounge.net>:
>> Am 19.10.2011 16:44, schrieb Frank Lahm:
>>
>>> cnid_metad writes a PID file too, so I'd add that here and see if that fixes it
>>
>> not really - see "lsof"
>
> it opens, writes and _closes_ the PID file, so of course you won't see
> it in lsof.
>
>> there is also no config-option for PID in the manpages
>> so i do not know what set for "PIDFile" in netalak-cnid.service
>
> look in /var/run or /var/lock.
>
> -f
found it in /var/lock, -P param seems not to be supported
anyways - this goes terrible wrong, see below :-(
there must be some bug and it should support -P as param
and/or place the default-pid-file in /var/run/
[root at testserver:~]$ cat /lib/systemd/system/netatalk-cnid.service
[Unit]
Description=Netatalk CNID
[Service]
Type=forking
PIDFile=/var/lock/cnid_metad
ExecStart=/usr/sbin/cnid_metad -l log_note
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target
__________________________________
[root at fileserver:~]$ stat /var/lock/cnid_metad
File: ?/var/lock/cnid_metad?
Size: 5 Blocks: 8 IO Block: 4096 reguläre Datei
Device: 811h/2065d Inode: 32791 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2011-10-13 03:24:36.705476427 +0200
Modify: 2011-10-13 03:24:36.705476427 +0200
Change: 2011-10-13 03:24:36.705476427 +0200
__________________________________
[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 17:15:45 +0200; 12s ago
Process: 2378 ExecStartPost=/bin/systemctl stop netatalk-cnid.service (code=exited, status=0/SUCCESS)
Process: 2375 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 (code=exited, status=0/SUCCESS)
Process: 2370 ExecStartPre=/bin/systemctl start netatalk-cnid.service (code=exited, status=0/SUCCESS)
Main PID: 2377 (afpd)
CGroup: name=systemd:/system/netatalk.service
└ 2377 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U
uams_dhx.so,uams_dhx2.so -g nobody -c 100
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: inactive (dead) since Wed, 19 Oct 2011 17:15:45 +0200; 17s ago
Process: 2371 ExecStart=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 2373 (code=exited, status=0/SUCCESS)
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 17:17:43 +0200; 2s ago
Process: 2405 ExecStartPost=/bin/systemctl stop netatalk-cnid.service (code=exited, status=0/SUCCESS)
Process: 2402 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 (code=exited, status=0/SUCCESS)
Process: 2397 ExecStartPre=/bin/systemctl start netatalk-cnid.service (code=exited, status=0/SUCCESS)
Main PID: 2404 (afpd)
CGroup: name=systemd:/system/netatalk.service
└ 2404 /usr/sbin/afpd -P /var/run/netatalk.pid -F /etc/netatalk/afpd.conf -U
uams_dhx.so,uams_dhx2.so -g nobody -c 100
[root at testserver:~]$ systemctl status netatalk-cnid.service
netatalk-cnid.service - Netatalk CNID
Loaded: loaded (/lib/systemd/system/netatalk-cnid.service)
Active: inactive (dead) since Wed, 19 Oct 2011 17:17:43 +0200; 6s ago
Process: 2398 ExecStart=/usr/sbin/cnid_metad -l log_note (code=exited, status=0/SUCCESS)
Main PID: 2400 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/netatalk-cnid.service
-------------- 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/e61de41d/attachment.pgp>
More information about the systemd-devel
mailing list