| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rc6.d/ |
Upload File : |
#!/bin/sh
#
# certmonger monitors certificates for impending expiration and can
# attempt to re-enroll when they expire
#
# chkconfig: 345 99 01
# description: Provides certificate monitoring and PKI enrollment.
# processname: /usr/sbin/certmonger
# pidfile: /var/run/certmonger.pid
#
### BEGIN INIT INFO
# Provides: certmonger
# Required-Start: messagebus
# Required-Stop: messagebus
# Should-Start: $network
# Should-Stop: $network
# Short-Description: Certificate monitor and PKI enrollment client
# Description: Provides certificate monitoring and PKI enrollment.
### END INIT INFO
program=/usr/sbin/certmonger
prog=${program##*/}
pidfile=/var/run/certmonger.pid
lockfile=/var/lock/subsys/certmonger
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi
if [ -f /etc/sysconfig/certmonger ]; then
. /etc/sysconfig/certmonger
fi
RETVAL=0
start() {
echo -n $"Starting $prog: "
[ -x $program ] || exit 5
daemon $program -S -p ${pidfile} $OPTS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $program
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f $lockfile
fi
}
mystatusq() {
status $program > /dev/null 2> /dev/null
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
if mystatusq ; then
touch $lockfile
exit 0
fi
$1
;;
stop)
if ! test -f $pidfile ; then
mystatusq || exit 0
fi
$1
;;
restart)
$1
;;
status)
status -p $pidfile $program
RETVAL=$?
;;
condrestart|try-restart)
[ -f $lockfile ] && restart || :
;;
reload)
echo "can't reload configuration, you have to restart it"
RETVAL=3
;;
force-reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
;;
esac
exit $RETVAL