SOURCES: privoxy.init (NEW), privoxy.logrotate (NEW) - init and lo...

freetz freetz at pld-linux.org
Sun Oct 23 11:48:03 CEST 2005


Author: freetz                       Date: Sun Oct 23 09:48:03 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- init and logrotate files for privoxy

---- Files affected:
SOURCES:
   privoxy.init (NONE -> 1.1)  (NEW), privoxy.logrotate (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/privoxy.init
diff -u /dev/null SOURCES/privoxy.init:1.1
--- /dev/null	Sun Oct 23 11:48:03 2005
+++ SOURCES/privoxy.init	Sun Oct 23 11:47:58 2005
@@ -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

================================================================
Index: SOURCES/privoxy.logrotate
diff -u /dev/null SOURCES/privoxy.logrotate:1.1
--- /dev/null	Sun Oct 23 11:48:03 2005
+++ SOURCES/privoxy.logrotate	Sun Oct 23 11:47:58 2005
@@ -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
+}
================================================================



More information about the pld-cvs-commit mailing list