aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-02-14 18:55:29 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-02-14 20:26:23 +0100
commit63a6d37b59fb74fc257428d8a3a1c1bb6b3f1e38 (patch)
treee0abe3bcbe5453046e7d0340bf865a8571c697fc
parent666569d4ae37b155bf562b3c38f2ae39293e9c8f (diff)
downloadaports-63a6d37b59fb74fc257428d8a3a1c1bb6b3f1e38.tar.bz2
aports-63a6d37b59fb74fc257428d8a3a1c1bb6b3f1e38.tar.xz
main/freeradius: install logrotate config
-rw-r--r--main/freeradius/APKBUILD3
-rw-r--r--main/freeradius/freeradius.logrotated34
2 files changed, 37 insertions, 0 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index d32c53ec22..83ec1b8a3c 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -65,6 +65,7 @@ subpackages="
"
provides="freeradius3=$pkgver-r$pkgrel"
source="ftp://ftp.freeradius.org/pub/freeradius/$pkgname-server-$pkgver.tar.gz
+ $pkgname.logrotated
radiusd.confd
radiusd.initd
setup-freeradius.in
@@ -162,6 +163,7 @@ package() {
install -m755 -D "$srcdir"/radiusd.initd "$pkgdir"/etc/init.d/radiusd
install -m644 -D "$srcdir"/radiusd.confd "$pkgdir"/etc/conf.d/radiusd
+ install -m644 -D "$srcdir"/$pkgname.logrotated "$pkgdir"/etc/logrotate.d/$pkgname
install -m755 -D setup-freeradius "$pkgdir"/usr/sbin/setup-freeradius
# Install misses to create this
@@ -371,6 +373,7 @@ _mvdb() {
}
sha512sums="513ed0a5d9e6b9a8d89a9b02c86ff528a9ff14d928f4c1040ca44702465abd711588fe6afa35554cb2c8e8bd7f19dd5be3dbc78445c62c7b00bf5cbc4c621312 freeradius-server-3.0.20.tar.gz
+c3ae1ee6bd7743f883310612ba2c20c6ff7f288fedc308735df05b097ecb2f7fa4d1679b844e262757808978c7bb2d7630b99e4b87ce6d6ba7f84013f9c49f1d freeradius.logrotated
bb3df1fa2c9ed95514ae090e0f6619c4e3280f424c4351bc79f5254bf1a327fa7d27e5fe3add5ab8d9e5ba3792c9553bd9a0481fe9c5bc34945ce46627ef2638 radiusd.confd
a66ab5d3f1c86450e9c50aa8be10a40fb4118467670048773ad8c80b5f3fb958dd3addc6ef245289d93ce2b184ce2c9882a8a2585d4a134d55c2326c9559f558 radiusd.initd
51f47db8dce93c4c4984093e8256bd0fb4d9c511fbbce610ef72478d8b216fb828fee3f70ae124d44c2a60b35d7792d05602480826845bb5bd4847ef6f745d84 setup-freeradius.in
diff --git a/main/freeradius/freeradius.logrotated b/main/freeradius/freeradius.logrotated
new file mode 100644
index 0000000000..1975caee75
--- /dev/null
+++ b/main/freeradius/freeradius.logrotated
@@ -0,0 +1,34 @@
+/var/log/radius/radius.log {
+ missingok
+ compress
+ notifempty
+ su radius radius
+ postrotate
+ /etc/init.d/radiusd --quiet --ifstarted reload
+ endscript
+}
+
+/var/log/radius/checkrad.log
+/var/log/radius/radwatch.log
+/var/log/radius/sqllog.sql {
+ missingok
+ compress
+ notifempty
+ nocreate
+ su radius radius
+}
+
+# There are different detail-rotating strategies you can use. One is
+# to write to a single detail file per IP and use the rotate config
+# below. Another is to write to a daily detail file per IP with:
+# detailfile = ${radacctdir}/%{Client-IP-Address}/%Y%m%d-detail
+# (or similar) in radiusd.conf, without rotation. If you go with the
+# second technique, you will need another cron job that removes old
+# detail files. You do not need to comment out the below for method #2.
+/var/log/radius/radacct/*/detail {
+ missingok
+ compress
+ notifempty
+ nocreate
+ su radius radius
+}