]> git.pld-linux.org Git - packages/privoxy.git/commitdiff
- init and logrotate files for privoxy
authorfreetz <freetz@pld-linux.org>
Sun, 23 Oct 2005 09:47:58 +0000 (09:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    privoxy.init -> 1.1
    privoxy.logrotate -> 1.1

privoxy.init [new file with mode: 0644]
privoxy.logrotate [new file with mode: 0644]

diff --git a/privoxy.init b/privoxy.init
new file mode 100644 (file)
index 0000000..0e0a88b
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# privoxy
+#
+# chkconfig:   345 85 15
+# description: Web proxy with advanced filtering capabilities
+# processname: privoxy
+#
+# pidfile:     /var/run/privoxy.pid
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Starting:
+       if [ ! -f /var/lock/subsys/privoxy ]; then
+               msg_starting privoxy
+               daemon privoxy \
+                   --user privoxy.privoxy \
+                   --pidfile /var/run/privoxy.pid \
+                   /etc/privoxy/config
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/privoxy
+       else
+               msg_already_running privoxy
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/privoxy ]; then
+               msg_stopping privoxy
+               killproc privoxy
+               rm -f /var/lock/subsys/privoxy >/dev/null 2>&1
+       else
+               msg_not_running privoxy
+       fi
+       ;;
+  reload|force-reload)
+       if [ -f /var/lock/subsys/privoxy ]; then
+               msg_reloading privoxy
+               killproc privoxy -HUP
+               RETVAL=$?
+       else
+               msg_not_running privoxy >&2
+               exit 7
+       fi
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status privoxy
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/privoxy.logrotate b/privoxy.logrotate
new file mode 100644 (file)
index 0000000..3e117e2
--- /dev/null
@@ -0,0 +1,16 @@
+/var/log/privoxy/logfile {
+       missingok
+       compress
+       size 1M
+       postrotate
+               /bin/kill -HUP `/sbin/pidof privoxy 2>/dev/null` 2> /dev/null || true
+       endscript
+}
+/var/log/privoxy/jarfile {
+       missingok
+       compress
+       size 1M
+       postrotate
+               /bin/kill -HUP `/sbin/pidof privoxy 2>/dev/null` 2> /dev/null || true
+       endscript
+}
This page took 0.14508 seconds and 4 git commands to generate.