diff --git a/srcpkgs/chrony/INSTALL b/srcpkgs/chrony/INSTALL new file mode 100644 index 00000000000..800ea0966cc --- /dev/null +++ b/srcpkgs/chrony/INSTALL @@ -0,0 +1,6 @@ +case ${ACTION} in +post) + [ ! -d var/log/chrony ] && mkdir -p var/log/chrony + chown chrony:chrony var/log/chrony + ;; +esac diff --git a/srcpkgs/chrony/REMOVE b/srcpkgs/chrony/REMOVE new file mode 100644 index 00000000000..1314cd1bd47 --- /dev/null +++ b/srcpkgs/chrony/REMOVE @@ -0,0 +1,7 @@ +case ${ACTION} in +purge) + [ -d var/log/chrony ] && rm -rf var/log/chrony + [ -f etc/chrony.conf ] && rm -f etc/chrony.conf + [ -f etc/chrony.drift ] && rm -f etc/chrony.drift + ;; +esac diff --git a/srcpkgs/chrony/files/chrony.conf b/srcpkgs/chrony/files/chrony.conf index e8a909c3263..ef58cb6237b 100644 --- a/srcpkgs/chrony/files/chrony.conf +++ b/srcpkgs/chrony/files/chrony.conf @@ -121,8 +121,8 @@ commandkey 1 # # Enable these two options to use this. -! dumponexit -! dumpdir /var/log/chrony +dumponexit +dumpdir /var/log/chrony # chronyd writes its process ID to a file. If you try to start a second # copy of chronyd, it will detect that the process named in the file is @@ -153,13 +153,13 @@ commandkey 1 # produce some graphs of your system's timekeeping performance, or you # need help in debugging a problem. -! logdir /var/log/chrony -! log measurements statistics tracking +logdir /var/log/chrony +#log measurements statistics tracking # If you have real time clock support enabled (see below), you might want # this line instead: -! log measurements statistics tracking rtc +log measurements statistics tracking rtc ####################################################################### ### ACTING AS AN NTP SERVER @@ -273,7 +273,7 @@ cmdallow 127.0.0.1 # You need to have 'enhanced RTC support' compiled into your Linux # kernel. (Note, these options apply only to Linux.) -! rtcfile /etc/chrony.rtc +rtcfile /etc/chrony.rtc # Your RTC can be set to keep Universal Coordinated Time (UTC) or local # time. (Local time means UTC +/- the effect of your timezone.) If you @@ -283,7 +283,7 @@ cmdallow 127.0.0.1 # that will work better if your RTC maintains local time. You take your # pick! -! rtconutc +rtconutc # By default chronyd assumes that the enhanced RTC device is accessed as # /dev/rtc. If it's accessed somewhere else on your system (e.g. you're @@ -309,4 +309,4 @@ cmdallow 127.0.0.1 # for extreme clock stability. Works only on Linux. Note that the "-m" # command-line switch will also enable this feature. -! lock_all +lock_all diff --git a/srcpkgs/chrony/files/chrony.service b/srcpkgs/chrony/files/chrony.service index 8bc8da9d253..292c52377ae 100644 --- a/srcpkgs/chrony/files/chrony.service +++ b/srcpkgs/chrony/files/chrony.service @@ -2,9 +2,7 @@ Description=Chrony Network Time Daemon [Service] -Type=forking -ExecStart=/usr/sbin/chronyd -PIDFile=/var/run/chronyd.pid +ExecStart=/usr/sbin/chronyd -n -u chrony [Install] WantedBy=multi-user.target diff --git a/srcpkgs/chrony/template b/srcpkgs/chrony/template index 996e910fb21..434aec34243 100644 --- a/srcpkgs/chrony/template +++ b/srcpkgs/chrony/template @@ -1,7 +1,7 @@ # Template file for 'chrony' pkgname=chrony version=1.26 -revision=1 +revision=2 homepage="http://chrony.tuxfamily.org/" distfiles="http://download.tuxfamily.org/chrony/$pkgname-$version.tar.gz" build_style=gnu_configure @@ -21,6 +21,7 @@ long_desc=" An administrator can use this to fine-tune various parameters within the daemon, add or delete servers etc whilst the daemon is running." +system_accounts="chrony" systemd_services="chrony.service" conf_files="/etc/chrony.conf"