aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/control3
-rw-r--r--debian/mauvealert-server.init15
2 files changed, 14 insertions, 4 deletions
diff --git a/debian/control b/debian/control
index a8edc31..a78c5e7 100644
--- a/debian/control
+++ b/debian/control
@@ -21,8 +21,9 @@ Description: Mauve network alert system -- client
Package: mauvealert-server
Architecture: all
+Pre-Depends: libjs-jquery
Depends: mauvealert-common,
- libjs-jquery,
+ adduser,
ruby1.8,
libhaml-ruby1.8,
liblog4r-ruby1.8,
diff --git a/debian/mauvealert-server.init b/debian/mauvealert-server.init
index 225a9d4..accea6c 100644
--- a/debian/mauvealert-server.init
+++ b/debian/mauvealert-server.init
@@ -47,16 +47,25 @@ 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 --startas $DAEMON --chuid $RUNASUSER --test > /dev/null \
- || return 1
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON --chuid $RUNASUSER --test > /dev/null \
+ || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --chuid $RUNASUSER --background --startas $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
+ count=0
+
+ while [ $((count = count + 1)) -le 5 ] ; do
+ echo -n .
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --startas $DAEMON --chuid $RUNASUSER --test > /dev/null \
+ || return 0
+ done
- sleep 5
+ return 2
}
#