summaryrefslogtreecommitdiff
path: root/pcr/openrc-devel/jenkins.logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openrc-devel/jenkins.logrotate')
-rw-r--r--pcr/openrc-devel/jenkins.logrotate17
1 files changed, 17 insertions, 0 deletions
diff --git a/pcr/openrc-devel/jenkins.logrotate b/pcr/openrc-devel/jenkins.logrotate
new file mode 100644
index 000000000..6dd4f1d5d
--- /dev/null
+++ b/pcr/openrc-devel/jenkins.logrotate
@@ -0,0 +1,17 @@
+/var/log/jenkins/jenkins.log /var/log/jenkins/access_log {
+ compress
+ dateext
+ maxage 365
+ rotate 99
+ size=+4096k
+ notifempty
+ missingok
+ create 644
+ postrotate
+ [ -r /etc/conf.d/jenkins ] && . /etc/conf.d/jenkins
+ if [ -s /run/jenkins.pid ]; then
+ JPID=$(cat /run/jenkins.pid)
+ test -n "$(find /proc/$JPID -maxdepth 0 -user ${RUN_AS:-jenkins} 2>/dev/null)" && kill -s ALRM $JPID || :
+ fi
+ endscript
+}