. /etc/rc.status
else
rc_status() {
+ r=$?
echo ""
+ return $r
}
fi
fi
# end of compatibility layer for RedHat/SuSE
-OPTIONS="-u nobody -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml"
+. /etc/metaproxy/metaproxy.user
+
+OPTIONS="-u $SERVER_USER -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml"
if [ -f /etc/sysconfig/metaproxy ]; then
. /etc/sysconfig/metaproxy
RETVAL=$?
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
+
reload() {
- stop
- start
+ echo -n $"Reloading $prog: "
+ $DAEMON $OPTIONS -t >/dev/null 2>&1
+ RETVAL=$?
+ if [ $RETVAL = 0 ]; then
+ killproc -p ${pidfile} $DAEMON -USR1 >/dev/null 2>&1
+ RETVAL=$?
+ if [ $RETVAL = 0 ]; then
+ i=0
+ p=`cat ${pidfile}`
+ while [ -d /proc/$p -a $i -lt 100 ]; do
+ i=`expr $i + 1`
+ usleep 50000
+ done
+ if [ -d /proc/$p ]; then
+ echo_failure
+ rc_status -v
+ RETVAL=1
+ else
+ rm -f ${pidfile}
+ fi
+ else
+ echo_failure
+ rc_status -v
+ fi
+ else
+ echo_failure
+ rc_status -v
+ echo $"not reloading due to configuration syntax error"
+ fi
+ if [ $RETVAL = 0 ]; then
+ daemon --pidfile ${pidfile} $DAEMON $OPTIONS -D -p ${pidfile}
+ rc_status -v
+ RETVAL=$?
+ [ $RETVAL = 0 ] && touch ${lockfile}
+ fi
+ return $RETVAL
}
# See how we were called.
fi
;;
reload)
- reload
+ if [ -f ${pidfile} ] ; then
+ reload
+ fi
;;
configtest)
$DAEMON $OPTIONS -t