16 lines
392 B
Diff
16 lines
392 B
Diff
# Fix (bnc#416221)
|
|
--- examples/logrotate.cron
|
|
+++ examples/logrotate.cron
|
|
@@ -1,5 +1,11 @@
|
|
#!/bin/sh
|
|
|
|
+# exit immediately if there is another instance running
|
|
+if pgrep logrotate; then
|
|
+ /bin/logger -t logrotate "ALERT another instance of logrotate is running - exiting"
|
|
+ exit 1;
|
|
+fi;
|
|
+
|
|
TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX`
|
|
|
|
/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF
|