summaryrefslogtreecommitdiff
path: root/community/squid/squid.cron
diff options
context:
space:
mode:
Diffstat (limited to 'community/squid/squid.cron')
-rw-r--r--community/squid/squid.cron9
1 files changed, 9 insertions, 0 deletions
diff --git a/community/squid/squid.cron b/community/squid/squid.cron
new file mode 100644
index 000000000..c78e51105
--- /dev/null
+++ b/community/squid/squid.cron
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# exit without error if no pidfile exists
+{ read pid </run/squid.pid; } 2>/dev/null || exit 0
+
+# make sure found PID really is a squid process
+if [ /proc/$pid/exec -ef /usr/sbin/squid ]; then
+ /usr/sbin/squid -k rotate
+fi