Re: Delay service startup but only on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 02.12.20 09:56, Richard Shaw (hobbes1069@xxxxxxxxx) wrote:

> I've got a SystemD service file that starts a service, the problem is it
> connects to another device that takes longer to boot up into a "ready"
> state than the computer with the service.
>
> I could just add a "ExecStartPre=/usr/bin/sleep 30" to the service file,
> but will it delay for 30 seconds on restarts as well? I only want it to
> wait on cold boots.
>
> I may be better off creating a timer unit file and using OnBootSec but
> didn't want to go with the complexity of a timer if I didn't have to.

That's more of a question for the systemd mailing list, rather than
the Fedora ML.

That said, what kind of device is it? Is it shown among the devices
"systemctl -t device" shows? If so, just add

   Wants=…
   After=…

to the [Unit] section of your unit file, both times listing the same
device unit name of your device on the right-hand-side.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux