[systemd-devel] Multiple starts of a service, what am I doing wrong?
D.S. Ljungmark
spider at aanstoot.se
Thu Sep 24 06:27:07 PDT 2015
(re-send due to wrong email address)
On 24/09/15 14:38, Daniel Mack wrote:
> 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.
That is correct. ExecStartPre does some environment/Testing, while the
actual submitter will run fpr ~20 hours, slowly doing network chatter,
and abort in case of network error (trusting systemd to restart it)
So, it's a daemon that never forks.
The question I have isn't about this running or not (it runs
beautifully, gets restarted when it should, and starts once it has a
certificate available)
However, systemd is _spewing_ out this "started service" message, even
while it's already running.
And that's what I'm trying to figure out.
//D.S.
--
8362 CB14 98AD 11EF CEB6 FA81 FCC3 7674 449E 3CFC
More information about the systemd-devel
mailing list