Blame | Last modification | View Log | RSS feed
#!/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 INFOprogram=/usr/sbin/certmongerprog=${program##*/}pidfile=/var/run/certmonger.pidlockfile=/var/lock/subsys/certmongerif [ -f /etc/rc.d/init.d/functions ]; then. /etc/rc.d/init.d/functionsfiif [ -f /etc/sysconfig/certmonger ]; then. /etc/sysconfig/certmongerfiRETVAL=0start() {echo -n $"Starting $prog: "[ -x $program ] || exit 5daemon $program -S -p ${pidfile} $OPTSRETVAL=$?echo[ $RETVAL -eq 0 ] && touch $lockfilereturn $RETVAL}stop() {echo -n $"Stopping $prog: "killproc $programRETVAL=$?echoif [ $RETVAL -eq 0 ]; thenrm -f $lockfilefi}mystatusq() {status $program > /dev/null 2> /dev/null}restart() {stopstart}# See how we were called.case "$1" instart)if mystatusq ; thentouch $lockfileexit 0fi$1;;stop)if ! test -f $pidfile ; thenmystatusq || exit 0fi$1;;restart)$1;;status)status -p $pidfile $programRETVAL=$?;;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;;esacexit $RETVAL