#!/bin/sh # # beidcrld Init file for the Belgian electronic ID card CRL daemon # # # chkconfig: 2345 90 10 # description: Belgian electronic ID card CRL daemon # pid /var/run/beidcrld.pid # processname: beidcrld # config: /etc/sysconfig/beidcrld ### BEGIN INIT INFO # Short-Description: Automatic CRL download (part of the Belgium eID card middleware) # Description: Start beidcrld to periodically download CRL to be used by the eID software libraries for verifying the validity of eID certificates # # Provides: beidcrld # Required-Start: $network $syslog $pcscd $beidpcscd # Required-Stop: $network $syslog $pcscd $beidpcscd # Default-Start: 2 3 5 # Default-Stop: 0 1 6 ### END INIT INFO source /etc/init.d/functions [ -x /usr/bin/beidcrld ] || exit 1 ### Default variables SYSCONFIG="/etc/sysconfig/beidcrld" OPTIONS="" ### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" RETVAL=0 prog="beidcrld" desc="Belgian eID CRL daemon" start() { echo -n $"Starting $desc ($prog): " daemon $prog $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog return $RETVAL } stop() { echo -n $"Shutting down $desc ($prog): " killproc $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog return $RETVAL } restart() { stop start } reload() { echo -n $"Reloading $desc ($prog): " killproc $prog -HUP RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condrestart) [ -e /var/lock/subsys/$prog ] && restart RETVAL=$? ;; status) status $prog RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" RETVAL=1 esac exit $RETVAL