summaryrefslogtreecommitdiffstats
path: root/funcweb/init-scripts
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-09 16:28:22 +0300
committermakkalot <makkalot@gmail.com>2008-07-09 16:28:22 +0300
commit19b7001418f6cf985820d600b4ef43ae7f023ff9 (patch)
tree84aacc82fee6f4f0c9302a48014672a69f55e742 /funcweb/init-scripts
parent375c395b6779d4586540795094d4c2d249a39a51 (diff)
downloadfunc-19b7001418f6cf985820d600b4ef43ae7f023ff9.tar.gz
func-19b7001418f6cf985820d600b4ef43ae7f023ff9.tar.xz
func-19b7001418f6cf985820d600b4ef43ae7f023ff9.zip
when we start the funcwebd we should be sure that the certmaster is also running, that patch starts the certmaster if it is not already :)
Diffstat (limited to 'funcweb/init-scripts')
-rwxr-xr-xfuncweb/init-scripts/funcwebd21
1 files changed, 21 insertions, 0 deletions
diff --git a/funcweb/init-scripts/funcwebd b/funcweb/init-scripts/funcwebd
index 01ee280..11be5e2 100755
--- a/funcweb/init-scripts/funcwebd
+++ b/funcweb/init-scripts/funcwebd
@@ -28,6 +28,8 @@
SERVICE=funcwebd
PROCESS=funcwebd
DAEMON=/usr/bin/funcwebd
+CERTMASTER=/usr/bin/certmaster
+CERTMASTER_PROC=certmaster
CONFIG_ARGS="--daemon"
@@ -66,6 +68,25 @@ fi
RETVAL=0
start() {
+
+ ps wt? | grep "$CERTMASTER" 2>&1 > /dev/null
+ if [ "x$?" = "x0" ]; then
+ CERT_RVAL=0
+ echo "certmaster is running"
+ else
+ CERT_RVAL=3
+ echo "certmaster is not running"
+ fi
+
+ if [ $CERT_RVAL -eq 3 ]; then
+ echo -n $"Starting certmaster daemon: "
+ START_DAEMON $CERTMASTER_PROC $CONFIG_ARGS
+ CERT_RVAL=$?
+ echo
+ [ $CERT_RVAL -eq 0 ] && touch /var/lock/subsys/$CERTMASTER_PROC
+ fi
+
+
echo -n $"Starting funcweb server"
START_DAEMON $PROCESS $CONFIG_ARGS
RETVAL=$?