From 49c5a9a96b323cd2fef09e515d727b6a2c0727a6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 4 Jun 2013 20:47:10 +0000 Subject: [PATCH] Fixed init.d script - hopefully --- Backend/etcinitd/swarmops-backend | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Backend/etcinitd/swarmops-backend b/Backend/etcinitd/swarmops-backend index 0bbe60d8..ffcc0019 100644 --- a/Backend/etcinitd/swarmops-backend +++ b/Backend/etcinitd/swarmops-backend @@ -20,11 +20,12 @@ # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Swarmops backend daemon" -NAME=daemonexecutablename -DAEMON=/opt/swarmops/backend/bin/ +NAME=swarmops-backend +MONO=/usr/bin/mono +DAEMON=/opt/swarmops/backend DAEMON_ARGS="--options args" PIDFILE=/var/run/swarmops-backend.pid -SCRIPTNAME=/etc/init.d/$NAME +SCRIPTNAME=/etc/init.d/swarmops-backend # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 @@ -49,10 +50,9 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --background --test $DAEMON/$NAME > /dev/null \ || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $MONO --make-pidfile --chdir $DAEMON --background $DAEMON/$NAME > /dev/null \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend