X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=debian%2Fcacert-gigi-testing.cacert-gigi.init;h=278f69075934c72149bb6fda99eada5545178ef4;hp=f0730123ed9fe23caed3916302e128593ada656f;hb=b140228857f82ed21769d25710982706277bbd93;hpb=ff4409c745ee9a48e1fd105eff2095df1d9abe95 diff --git a/debian/cacert-gigi-testing.cacert-gigi.init b/debian/cacert-gigi-testing.cacert-gigi.init index f0730123..278f6907 100644 --- a/debian/cacert-gigi-testing.cacert-gigi.init +++ b/debian/cacert-gigi-testing.cacert-gigi.init @@ -26,10 +26,15 @@ SCRIPTNAME=/etc/init.d/$NAME DIR=/var/lib/cacert-gigi # Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 +[ -r "/usr/share/java/gigi.jar" ] || exit 0 # 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,15 +49,15 @@ DIR=/var/lib/cacert-gigi # do_start() { - if [ ! -f /etc/cacert-gigi/conf.tar ]; then + if [ ! -f /etc/cacert/gigi/conf.tar ]; then echo Missing gigi-configfile - exit 2 - fi + exit 2 + fi # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - start-stop-daemon -b --start --quiet --pidfile $PIDFILE -d $DIR --exec $DAEMON --test > /dev/null \ + start-stop-daemon --start --quiet --pidfile $PIDFILE -d $DIR --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon -b --start --quiet --pidfile $PIDFILE -d $DIR --exec /usr/bin/gigi -- start-daemon \ || return 2