diff options
author | Robin Norwood <rnorwood@redhat.com> | 2007-09-24 17:43:05 -0400 |
---|---|---|
committer | Robin Norwood <rnorwood@redhat.com> | 2007-09-24 17:43:05 -0400 |
commit | 3a78963db6e4747be51935bdd1928e220945b49b (patch) | |
tree | 72319cc571b8c783e836ef5b9aa7f852d858decc /init-scripts | |
parent | fbb252b32b8d966bde90aa8c6f9fb544b100149b (diff) | |
parent | 0067f7ff6189fdd46f49e45ed2099511eb4de004 (diff) | |
download | third_party-func-3a78963db6e4747be51935bdd1928e220945b49b.tar.gz third_party-func-3a78963db6e4747be51935bdd1928e220945b49b.tar.xz third_party-func-3a78963db6e4747be51935bdd1928e220945b49b.zip |
Merge branch 'master' of git://git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'init-scripts')
-rwxr-xr-x | init-scripts/certmaster | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/init-scripts/certmaster b/init-scripts/certmaster new file mode 100755 index 0000000..71d5d8a --- /dev/null +++ b/init-scripts/certmaster @@ -0,0 +1,82 @@ +#!/bin/sh +# +# certmaster certmaster +################################### + +# LSB header + +### BEGIN INIT INFO +# Provides: certmaster +# Required-Start: network +# Default-Start: 3 4 5 +# Short-Description: certificate master for Fedora Unified Network Control 'master server only' +# Description: certificate master to sign/manage ca/cert infrastructure for func +### END INIT INFO + +# chkconfig header + +# chkconfig: 345 98 99 +# description: certificate master to sign/manage ca/cert infrastructure for func +# +# processname: /usr/bin/certmaster + +# Sanity checks. +[ -x /usr/bin/certmaster ] || exit 0 + +# Source function library. +. /etc/rc.d/init.d/functions + +SERVICE=certmaster +PROCESS=certmaster +CONFIG_ARGS=" " + +RETVAL=0 + +start() { + echo -n $"Starting certmaster daemon: " + daemon --check $SERVICE $PROCESS --daemon $CONFIG_ARGS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SERVICE + return $RETVAL +} + +stop() { + echo -n $"Stopping certmaster daemon: " + killproc $PROCESS + RETVAL=$? + echo + if [ $RETVAL -eq 0 ]; then + rm -f /var/lock/subsys/$SERVICE + rm -f /var/run/$SERVICE.pid + fi +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start|stop|restart) + $1 + ;; + status) + status $PROCESS + RETVAL=$? + ;; + condrestart) + [ -f /var/lock/subsys/$SERVICE ] && restart || : + ;; + reload) + echo "can't reload configuration, you have to restart it" + RETVAL=$? + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" + exit 1 + ;; +esac +exit $RETVAL + |