[systemd-devel] On writing a systemd service file

W. Michael Petullo mike at flyn.org
Mon Jul 11 11:12:52 PDT 2011


I am trying to migrate a service from a SysV-style initialization script
to systemd on Fedora.

After referencing the documentation I could find, I have written the
following service description:

[Unit]
Description=DMAP Service
After=avahi-daemon.service

[Service]
Type=forking
PIDFile=/var/run/dmapd/dmapd.pid
ExecStart=/usr/sbin/dmapd

[Install]
WantedBy=multi-user.target

But, when I try to start the service, I get:

$ sudo systemctl start dmapd.service
Job failed. See system logs and 'systemctl status' for details.

and in the logs:

Jul 11 12:55:38 imp systemd[1]: dmapd.service operation timed out. Terminating.
Jul 11 12:57:09 imp systemd[1]: Unit dmapd.service entered failed state.

I don't know what operation is timing out. I can see that dmapd is running
fine (and /var/run/dmapd/dmapd.pid exists) until this operation times
out. Then systemd/systemctl seems to kill dmapd and systemctl exits with
an error.

-- 
Mike

:wq


More information about the systemd-devel mailing list