[systemd-devel] [Netatalk-admins] netatalk: afpd/cnid service

Frank Lahm franklahm at googlemail.com
Wed Oct 19 07:44:12 PDT 2011


2011/10/19 Reindl Harald <h.reindl at thelounge.net>:
>
>
> 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

cnid_metad writes a PID file too, so I'd add that here and see if that fixes it.

-f


More information about the systemd-devel mailing list