Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
#!/bin/sh
#
# qpoppersd Qpopper POP3S server
#
# chkconfig: 345 85 15
# description: Qpopper is a highly configurable POP3 daemon.
# processname: qpoppersd
# pidfile: /var/run/qpoppersd.pid
# config: /etc/qpopper/config
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
# Get service config
[ -f /etc/sysconfig/qpoppers ] && . /etc/sysconfig/qpoppers
# Check that networking is up.
if [ "${NETWORKING}" = "yes" ]; then
if [ ! -f /var/lock/subsys/network ]; then
if [ "$1" != stop -a "$1" != status ]; then
#echo "ERROR: Networking is down. %s can't be run."
exit 1
fi
fi
else
exit 0
fi
MYPROG=qpoppersd
RETVAL=0
start() {
# Check if the service is already running?
echo -n $"Starting Qpopper SSL: "
if [ ! -f /var/lock/subsys/${MYPROG} ]; then
daemon --force ${MYPROG} $QPOPPER_OPTS
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
pidof ${MYPROG} > /var/run/${MYPROG}.pid
touch /var/lock/subsys/${MYPROG}
fi
else
failure
RETVAL=1
echo
fi
return $RETVAL
}
stop() {
# Stop daemons.
echo -n $"Shutting down Qpopper SSL: "
if [ -f /var/lock/subsys/${MYPROG} ]; then
killproc ${MYPROG}
RETVAL=$?
echo
rm -f /var/lock/subsys/${MYPROG} > /dev/null 2>&1
else
failure
RETVAL=1
echo
fi
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
status)
status ${MYPROG}
RETVAL=$?
;;
restart|force-reload)
stop
usleep 500000
start
RETVAL=$?
;;
*)
echo "${MYPROG} {start|stop|restart|force-reload|status}"
exit 3
esac
exit $RETVAL