Hi,

> > Does systemd give me a different way to check if the time is in sync?
> > Is there a way to create this dependency without implying a restart when
> > ntpd restarts?
> https://unix.stackexchange.com/questions/388586/systemd-requires-vs-wants
> <https://unix.stackexchange.com/questions/388586/systemd-requires-vs-wants>
>
> just replace "Requires" with "Wants", it does exactly the same but your
> Tomcat would also get started if "time-sync.target" is missing *but* it
> would not be stopped just because ntpd is stopped
>
> there are really very few cases when Requires is really what someone wants

We first tried it with wants, but wants does start the application
server even if the time-sync.target does not work.

>From the man page:
           Units listed in this option will be started if the
configuring unit is. *However, if the listed units fail to start or
cannot be added to the**
**           transaction, this has no impact on the validity of the
transaction as a whole*, and this unit will still be started. This is
the recommended
           way to hook the start-up of one unit to the start-up of
another unit.

We don't want tomcat to start when time-sync doesn't succeed, but when
ntpd restarts it should not influence tomcat.

Jan Hugo

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to