[systemd-devel] Multiple starts of a service, what am I doing wrong?

Daniel Mack daniel at zonque.org
Thu Sep 24 05:38:12 PDT 2015


On 09/24/2015 01:17 PM, D.S. Ljungmark wrote:
> I've got the following unit:
> 
> [Unit]
> Description=Random Submitter
> Wants=network-online.target
> After=network-online.target other.service
> RequiresMountsFor=/data
> 
> [Service]
> Type=simple

Type=simple implies that the executable specified through ExecStart= is
the main process and that it does not fork but 'block'. Is that the
case? If it does fork, like most daemons do, Type= should be set to
'forking'.

Or do you actually want to run that binary just once, without systemd
restarting it after it died? That you should set Type= to 'oneshot'.

See systemd.service(5) for more information.


HTH,
Daniel



More information about the systemd-devel mailing list