Permalink
Browse files

Create org.squid-cache.squid-rotate.plist

Launch daemon to rotate and prune squid logs
  • Loading branch information...
essandess committed May 10, 2017
1 parent 2c2c58d commit 41540a2fdd0e8e72694de315b4e983b4dd6631d3
Showing with 21 additions and 0 deletions.
  1. +21 −0 org.squid-cache.squid-rotate.plist
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.squid-cache.squid-rotate.plist</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>/opt/local/sbin/squid -k rotate ; find /opt/local/var/squid/logs -mindepth 1 -mtime +30 -exec /bin/rm {} &apos;;&apos;</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>0</integer>
</dict>
<key>ServiceDescription</key>
<string>Rotate Squid Logs Every Day at Midnight</string>
</dict>
</plist>

0 comments on commit 41540a2

Please sign in to comment.