PATH="$PATH:sbindir"
-start() {
- if ${CLIENT} >/dev/null 2>&1; then
+start_debian() {
+ printf "Starting DisOrder server: disorderd"
+ start-stop-daemon -S -q -x ${DAEMON}
+ echo .
+}
+
+start_generic() {
+ if ${CLIENT} version >/dev/null 2>&1; then
: already running
else
printf "Starting DisOrder server: disorderd"
fi
}
+start() {
+ if test -e /sbin/start-stop-daemon; then
+ start_debian
+ else
+ start_generic
+ fi
+}
+
+stop_debian() {
+ printf "Stopping DisOrder server: disorderd"
+ start-stop-daemon -K -o -q -x ${DAEMON}
+ echo .
+}
+
+stop_generic() {
+ if ${CLIENT} version >/dev/null 2>&1; then
+ printf "Stopping DisOrder server: disorderd"
+ ${CLIENT} shutdown
+ echo .
+ else
+ : not running
+ fi
+}
+
stop() {
- if ${CLIENT} >/dev/null 2>&1; then
- printf "Stopping DisOrder server: disorderd"
- ${CLIENT} shutdown
- echo .
+ if test -e /sbin/start-stop-daemon; then
+ stop_debian
else
- : not running
+ stop_generic
fi
}