Mailing List Archive

r1447 - trunk/varnish-cache/redhat
Author: ingvar
Date: 2007-05-17 20:17:12 +0200 (Thu, 17 May 2007)
New Revision: 1447

Modified:
trunk/varnish-cache/redhat/varnish.initrc
Log:
just some output cleanup

Modified: trunk/varnish-cache/redhat/varnish.initrc
===================================================================
--- trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 16:51:41 UTC (rev 1446)
+++ trunk/varnish-cache/redhat/varnish.initrc 2007-05-17 18:17:12 UTC (rev 1447)
@@ -21,14 +21,6 @@

DAEMON="/usr/sbin/varnishd"

-# $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one
-# have to set up a backend.
-if [ "$DAEMON_OPTS" = "" ]; then
- echo "No values specified in DAEMON_OPTS. Please read the varnishd(1)"
- echo "manpage and put configuration options in /etc/sysconfig/varnish"
- exit 1
-fi
-
mkdir -p /var/run/varnish 2>/dev/null

# Open files (usually 1024, which is way too small for varnish)
@@ -39,16 +31,25 @@
case "$1" in
start)
echo -n "Starting varnish HTTP accelerator: "
- daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE}
- sleep 1
- pkill -0 $PROCNAME
- RETVAL=$?
- if [ $RETVAL -eq 0 ]
- then
+
+ # $DAEMON_OPTS is set in /etc/sysconfig/varnish. At least, one
+ # has to set up a backend, or /tmp will be used, which is a bad idea.
+ if [ "$DAEMON_OPTS" = "" ]; then
+ echo "\$DAEMON_OPTS empty."
+ echo -n "Please put configuration options in /etc/sysconfig/varnish"
+ echo_failure
+ else
+ daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1
+ sleep 1
+ pkill -0 $PROCNAME
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]
+ then
echo_success
touch $LOCKFILE
- else
+ else
echo_failure
+ fi
fi
echo
;;