1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Base System/Daemons
11 url = http://chrony.tuxfamily.org
13 summary = An NTP client/server.
16 A client/server for the Network Time Protocol, this program keeps your
17 computer's clock accurate. It was specially designed to support
18 systems with intermittent internet connections, but it also works well
19 in permanently connected environments. It can use also hardware reference
20 clocks, system real-time clock or manual input as time references.
35 --with-sendmail=/usr/sbin/sendmail
41 build_targets += getdate all docs
42 install_targets += install-docs
45 mkdir -pv %{BUILDROOT}/var/{lib,log}/chrony
46 touch %{BUILDROOT}/var/lib/chrony/{drift,rtc}
48 mkdir -pv %{BUILDROOT}/etc
49 install -m 644 -p %{DIR_SOURCE}/chrony.conf %{BUILDROOT}/etc/chrony.conf
50 install -m 640 -p %{DIR_SOURCE}/chrony.keys %{BUILDROOT}/etc/chrony.keys
51 chown -v root.chrony %{BUILDROOT}/etc/chrony.keys
53 mkdir -pv %{BUILDROOT}/etc/dhcp/dhclient.d
54 install -m 755 -p %{DIR_SOURCE}/chrony.dhclient \
55 %{BUILDROOT}/etc/dhcp/dhclient.d/chrony.sh
57 mkdir -pv %{BUILDROOT}/etc/logrotate.d
58 install -m 644 -p %{DIR_SOURCE}/chrony.logrotate \
59 %{BUILDROOT}/etc/logrotate.d/chrony
61 mkdir -pv %{BUILDROOT}/usr/lib/chrony
62 install -m 755 -p %{DIR_SOURCE}/chrony-helper %{BUILDROOT}/usr/lib/chrony-helper
64 chown -Rv chrony.chrony %{BUILDROOT}/var/{lib,log}/chrony
69 getent group chrony >/dev/null || /usr/sbin/groupadd -r chrony
70 getent passwd chrony >/dev/null || /usr/sbin/useradd -r -g chrony \
71 -d /var/lib/chrony -s /sbin/nologin chrony
76 preprequires = shadow-utils systemd-units
88 /bin/systemctl daemon-reload &>/dev/null
89 /bin/systemctl enable cronyd.service &>/dev/null
93 /bin/systemctl --no-reload disable \
94 chrony-wait.service chronyd.service &>/dev/null
95 /bin/systemctl stop chrony-wait.service chronyd.service &>/dev/null
99 /bin/systemctl daemon-reload &>/dev/null
100 /bin/systemctl try-restart chronyd.service &>/dev/null