projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Completed proofreading the actions chapter
[privoxy.git]
/
privoxy.init
diff --git
a/privoxy.init
b/privoxy.init
index
a835405
..
ff05a7e
100644
(file)
--- a/
privoxy.init
+++ b/
privoxy.init
@@
-1,4
+1,14
@@
#!/bin/sh
#!/bin/sh
+#
+# This is file /etc/rc.d/init.d/privoxy and was put here
+# by the privoxy rpm
+#
+# chkconfig: 235 84 09
+#
+# description: This shell script takes care of starting and stopping \
+# privoxy.
+#
+
# ********************************************************************
#
# File : $Source: /cvsroot/ijbswa/current/privoxy.init,v $
# ********************************************************************
#
# File : $Source: /cvsroot/ijbswa/current/privoxy.init,v $
@@
-33,6
+43,13
@@
#
# Revisions :
# $Log: privoxy.init,v $
#
# Revisions :
# $Log: privoxy.init,v $
+# Revision 1.7 2002/04/08 14:54:51 morcego
+# Moved the chkconfig comments to the begining of the file, couse Linuxconf
+# was getting confused with it where it was.
+#
+# Revision 1.6 2002/03/26 22:29:55 swa
+# we have a new homepage!
+#
# Revision 1.5 2002/03/25 06:14:18 morcego
# Removing the OPRG definition (no longer needed)
#
# Revision 1.5 2002/03/25 06:14:18 morcego
# Removing the OPRG definition (no longer needed)
#
@@
-148,15
+165,6
@@
#
# ********************************************************************/
#
# ********************************************************************/
-# This is file /etc/rc.d/init.d/privoxy and was put here
-# by the privoxy rpm
-#
-# chkconfig: 235 84 09
-#
-# description: This shell script takes care of starting and stopping \
-# privoxy.
-#
-
# Source function library.
. /etc/rc.d/init.d/functions
# Source function library.
. /etc/rc.d/init.d/functions
@@
-166,39
+174,39
@@
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
-
JB
_PRG="privoxy"
-
JB_BIN="/usr/sbin/$JB
_PRG"
-
JB_CONF="/etc/$JB
_PRG/config"
-
JB
_USER="privoxy"
-
JB_PID=/var/run/$JB
_PRG.pid
-
JB_LOCK=/var/lock/subsys/$JB
_PRG
-
JB="$JB_BIN --user $JB_USER.$JB_USER --pidfile $JB_PID $JB
_CONF"
+
PRIVOXY
_PRG="privoxy"
+
PRIVOXY_BIN="/usr/sbin/$PRIVOXY
_PRG"
+
PRIVOXY_CONF="/etc/$PRIVOXY
_PRG/config"
+
PRIVOXY
_USER="privoxy"
+
PRIVOXY_PID=/var/run/$PRIVOXY
_PRG.pid
+
PRIVOXY_LOCK=/var/lock/subsys/$PRIVOXY
_PRG
+
PRIVOXY="$PRIVOXY_BIN --user $PRIVOXY_USER.$PRIVOXY_USER --pidfile $PRIVOXY_PID $PRIVOXY
_CONF"
# some checks for us
# some checks for us
-! [ -x $
JB_BIN ] && echo "Can't find $JB
_BIN, exit." && exit 0
-! [ -f $
JB_CONF ] && echo "Can't find $JB
_CONF, exit." && exit 0
+! [ -x $
PRIVOXY_BIN ] && echo "Can't find $PRIVOXY
_BIN, exit." && exit 0
+! [ -f $
PRIVOXY_CONF ] && echo "Can't find $PRIVOXY
_CONF, exit." && exit 0
# See how we were called.
start () {
# start daemon
# See how we were called.
start () {
# start daemon
- echo -n $"Starting $
JB
_PRG: "
- if [ -f $
JB
_PID ]; then
- killproc $
JB_PRG && rm -f $JB_LOCK $JB
_PID
+ echo -n $"Starting $
PRIVOXY
_PRG: "
+ if [ -f $
PRIVOXY
_PID ]; then
+ killproc $
PRIVOXY_PRG && rm -f $PRIVOXY_LOCK $PRIVOXY
_PID
RETVAL=$?
[ $RETVAL != 0 ] && return $RETVAL
fi
RETVAL=$?
[ $RETVAL != 0 ] && return $RETVAL
fi
- daemon $
JB
+ daemon $
PRIVOXY
RETVAL=$?
echo
RETVAL=$?
echo
- [ $RETVAL = 0 ] && touch $
JB
_LOCK
+ [ $RETVAL = 0 ] && touch $
PRIVOXY
_LOCK
return $RETVAL
}
stop () {
# stop daemon
return $RETVAL
}
stop () {
# stop daemon
- echo -n $"Stopping $
JB
_PRG: "
- killproc $
JB_PRG && rm -f $JB_LOCK $JB
_PID
+ echo -n $"Stopping $
PRIVOXY
_PRG: "
+ killproc $
PRIVOXY_PRG && rm -f $PRIVOXY_LOCK $PRIVOXY
_PID
RETVAL=$?
echo
return $RETVAL
RETVAL=$?
echo
return $RETVAL
@@
-212,8
+220,8
@@
case "$1" in
stop
;;
reload)
stop
;;
reload)
- if [ -f $
JB
_PID ] ; then
- kill -HUP `cat $
JB
_PID`
+ if [ -f $
PRIVOXY
_PID ] ; then
+ kill -HUP `cat $
PRIVOXY
_PID`
RETVAL=$?
fi
;;
RETVAL=$?
fi
;;
@@
-224,27
+232,27
@@
case "$1" in
;;
condrestart)
# restart only if already running
;;
condrestart)
# restart only if already running
- if [ -f $
JB
_PID ] ; then
+ if [ -f $
PRIVOXY
_PID ] ; then
stop
start
RETVAL=$?
fi
;;
status)
stop
start
RETVAL=$?
fi
;;
status)
- status $
JB
_PRG
+ status $
PRIVOXY
_PRG
RETVAL=$?
;;
top)
RETVAL=$?
;;
top)
- if [ -f $
JB
_PID ]; then
+ if [ -f $
PRIVOXY
_PID ]; then
a=""
a=""
- for i in `pidof $
JB
_PRG` ; do
+ for i in `pidof $
PRIVOXY
_PRG` ; do
a="$a -p $i"
done
top $a
fi
;;
*)
a="$a -p $i"
done
top $a
fi
;;
*)
- echo $"Usage: $
JB
_PRG {start|stop|reload|restart|condrestart|status|top}"
+ echo $"Usage: $
PRIVOXY
_PRG {start|stop|reload|restart|condrestart|status|top}"
exit 1
esac
exit 1
esac