chrony: run as chrony user/group, do not fork, provide logging, extras.
This commit is contained in:
parent
c613e30446
commit
43c1e78ae2
5 changed files with 24 additions and 12 deletions
6
srcpkgs/chrony/INSTALL
Normal file
6
srcpkgs/chrony/INSTALL
Normal file
|
@ -0,0 +1,6 @@
|
|||
case ${ACTION} in
|
||||
post)
|
||||
[ ! -d var/log/chrony ] && mkdir -p var/log/chrony
|
||||
chown chrony:chrony var/log/chrony
|
||||
;;
|
||||
esac
|
7
srcpkgs/chrony/REMOVE
Normal file
7
srcpkgs/chrony/REMOVE
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue