summaryrefslogtreecommitdiff
path: root/user/chrony/chrony.logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'user/chrony/chrony.logrotate')
-rw-r--r--user/chrony/chrony.logrotate12
1 files changed, 12 insertions, 0 deletions
diff --git a/user/chrony/chrony.logrotate b/user/chrony/chrony.logrotate
new file mode 100644
index 000000000..4461a3063
--- /dev/null
+++ b/user/chrony/chrony.logrotate
@@ -0,0 +1,12 @@
+/var/log/chrony/*.log {
+ missingok
+ 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
+}
+