aboutsummaryrefslogtreecommitdiffstats
path: root/main/chrony/chrony.logrotate
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-08-18 20:11:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-08-18 20:11:05 +0000
commite732b8bc4e70705f6ee1cd415929854258e60068 (patch)
tree33c2f95c174db0094b049384742fe5660a45b57a /main/chrony/chrony.logrotate
parent94dbf79b4bb7fd4c2970aec8593ba4a33cdbb6c4 (diff)
downloadaports-e732b8bc4e70705f6ee1cd415929854258e60068.tar.bz2
aports-e732b8bc4e70705f6ee1cd415929854258e60068.tar.xz
main/chrony: add logrotate script
fixes #82
Diffstat (limited to 'main/chrony/chrony.logrotate')
-rw-r--r--main/chrony/chrony.logrotate11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/chrony/chrony.logrotate b/main/chrony/chrony.logrotate
new file mode 100644
index 0000000000..1b7b589a9f
--- /dev/null
+++ b/main/chrony/chrony.logrotate
@@ -0,0 +1,11 @@
+/var/log/chrony/*.log
+ sharedscripts
+ postrotate
+ PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`
+ cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
+ password $PASSWORD
+ cyclelogs
+ EOF
+ endscript
+}
+