aboutsummaryrefslogtreecommitdiffstats
path: root/main/chrony
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
parent94dbf79b4bb7fd4c2970aec8593ba4a33cdbb6c4 (diff)
downloadaports-e732b8bc4e70705f6ee1cd415929854258e60068.tar.bz2
aports-e732b8bc4e70705f6ee1cd415929854258e60068.tar.xz
main/chrony: add logrotate script
fixes #82
Diffstat (limited to 'main/chrony')
-rw-r--r--main/chrony/APKBUILD6
-rw-r--r--main/chrony/chrony.logrotate11
2 files changed, 15 insertions, 2 deletions
diff --git a/main/chrony/APKBUILD b/main/chrony/APKBUILD
index 21f8924a66..a625e6959a 100644
--- a/main/chrony/APKBUILD
+++ b/main/chrony/APKBUILD
@@ -1,11 +1,11 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=chrony
pkgver=1.23
-pkgrel=2
+pkgrel=3
pkgdesc="NTP client and server programs"
url="http://chrony.sunsite.dk/"
license="GPL-2"
-depends=
+depends="logrotate"
makedepends="texinfo"
subpackages="$pkgname-doc"
source="http://chrony.sunsite.dk/download/$pkgname-$pkgver.tar.gz
@@ -16,6 +16,7 @@ source="http://chrony.sunsite.dk/download/$pkgname-$pkgver.tar.gz
$pkgname-1.23-reply-ip.diff
chronyd.confd
chronyd.initd
+ chrony.logrotate
chrony.conf
"
@@ -57,4 +58,5 @@ d47015a34b6b2f9eebca77ef939cec72 chrony-1.21-makefile.diff
caa6589a1a1cd56f64957e312d1ef84c chrony-1.23-reply-ip.diff
d5c09be46226774d22c08c5a4c28093a chronyd.confd
dac8aa4913d7c323abfa1719ddd7e5e4 chronyd.initd
+468eaf2b5465d60b3ee021ce3f948ab1 chrony.logrotate
46f42c52953d398ca44d6baa449618d7 chrony.conf"
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
+}
+