Add logrotate
This commit is contained in:
parent
d8f3044cfa
commit
86045d89ef
|
@ -0,0 +1,14 @@
|
|||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
|
||||
. ../APKBUILD-config.template
|
||||
|
||||
pkgver=2021.06.27.01
|
||||
pkgrel=0
|
||||
source="
|
||||
logrotate.conf
|
||||
"
|
||||
|
||||
sha512sums="
|
||||
33a1081e6a2f5715421b777b38688918e6872358b442ef68975e7bdaed00e1d699e3f963509e620de368bd54c321194c99e3996bbfc89f5f9fc5d6d460fba085 logrotate.conf
|
||||
"
|
|
@ -0,0 +1,10 @@
|
|||
weekly
|
||||
rotate 4
|
||||
maxage 365
|
||||
dateext
|
||||
compress
|
||||
notifempty
|
||||
missingok
|
||||
|
||||
/var/log/messages {}
|
||||
/var/log/*.log {}
|
|
@ -0,0 +1,17 @@
|
|||
# Contributor: Alex Denes <caskd@redxen.eu>
|
||||
# Maintainer: Alex Denes <caskd@redxen.eu>
|
||||
|
||||
. ../APKBUILD-cron.template
|
||||
|
||||
pkgver=2021.06.27.02
|
||||
pkgrel=0
|
||||
depends="$depends logrotate redxen-config-$_rx_pkgname"
|
||||
source="daily"
|
||||
|
||||
package() {
|
||||
_rx_installdir="/etc/periodic/daily" rx_install "daily" "logrotate.redxen" # logrotate already uses cron
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ab1c6d49a7a8e15497be3f79747c272e09b8b643976672d15f76fa522b436104ac6d460530db3fea48f6cf72b6bb280ff65a3262da5804faed4cc0fc008e62a1 daily
|
||||
"
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
/usr/sbin/logrotate /etc/redxen/logrotate/
|
||||
EXITVALUE=$?
|
||||
if [ $EXITVALUE != 0 ]; then
|
||||
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
|
||||
fi
|
||||
exit 0
|
Loading…
Reference in New Issue