]> WPIA git - cassiopeia.git/blobdiff - debian/cacert-cassiopeia.init
add: Split the installation package
[cassiopeia.git] / debian / cacert-cassiopeia.init
index 4352885c9531a231b197ac9a38bd5d347b74cd25..bc5b464d8cc2ee2670ac852eee736532a0a63e3a 100644 (file)
@@ -18,7 +18,7 @@
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="cacert's signer software"
-NAME=cassiopeia
+NAME=cacert-cassiopeia
 DAEMON=/usr/bin/cassiopeia
 DAEMON_ARGS=
 PIDFILE=/var/run/$NAME.pid
@@ -30,6 +30,10 @@ DIR=/var/lib/cacert-gigi
 
 # Read configuration variable file if it is present
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
+if [ "$START_DAEMON" = "0" ]; then
+    echo "Not starting $NAME (as configured in /etc/default/$NAME)";
+    exit 0;
+fi
 
 # Load the VERBOSE setting and other rcS variables
 . /lib/init/vars.sh
@@ -44,7 +48,7 @@ DIR=/var/lib/cacert-gigi
 #
 do_start()
 {
-       if [ ! -f /var/lib/cacert-gigi/config.txt ]; then
+       if [ ! -f /etc/cacert/cassiopeia/cassiopeia.conf ]; then
                echo Missing cassiopeia-configfile
                 exit 2
         fi
@@ -55,7 +59,7 @@ do_start()
         start-stop-daemon -b --start --quiet --pidfile $PIDFILE -d $DIR --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon -b --start --quiet --pidfile $PIDFILE --make-pidfile -d $DIR -c nobody --exec $DAEMON --no-close -- \
-               >> /var/log/cassiopeia.log 2>&1 \
+               >> /var/log/cacert-cassiopeia.log 2>&1 \
                || return 2
        # The above code will not work for interpreted scripts, use the next
        # six lines below instead (Ref: #643337, start-stop-daemon(8) )