[chrony-users] Delaying postfix until chronyd gets the time

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


This is on Centos7 on arm:

In my continuing journey to run a armv7 server with no battery clock, I have been strongly advised on the postfix list that it should NOT start until the system time is after the create time of the running version of postfix.

/usr/lib/systemd/system/postfix.service has:


[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service

[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStartPre=-/usr/libexec/postfix/chroot-update
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop

[Install]
WantedBy=multi-user.target

Adding chronyd.service to the After statement would only delay postfix until chronyd started, not until it set the time (and what if the network was down at startup time?).

How might I add a ExecStartPre clause that would delay postfix until the system time was right?

thanks



--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/