[ufoai] 02/10: Clean up ufoai-server.init

Markus Koschany apo-guest at moszumanska.debian.org
Fri Jan 23 17:25:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository ufoai.

commit 17db981b29788131ccab28f4c2fa557e4b3b508c
Author: Markus Koschany <apo at gambaru.de>
Date:   Tue Dec 9 07:54:48 2014 +0100

    Clean up ufoai-server.init
---
 debian/ufoai-server.init | 58 +++++++++++++++++++++---------------------------
 1 file changed, 25 insertions(+), 33 deletions(-)

diff --git a/debian/ufoai-server.init b/debian/ufoai-server.init
index 2fee42e..9d17485 100644
--- a/debian/ufoai-server.init
+++ b/debian/ufoai-server.init
@@ -24,20 +24,30 @@ test -x $DAEMON || exit 0
 
 # Include defaults if available
 if [ -f /etc/default/$NAME ] ; then
-	. /etc/default/$NAME
+    . /etc/default/$NAME
 fi
 
 ufo_start() {
-    start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
-	--background --exec $BINARY --startas $DAEMON \
-	--make-pidfile --chuid $USER \
-	-- $DAEMON_OPTS > /dev/null 2>&1 || return 1
+    start-stop-daemon \
+        --start \
+        --quiet \
+        --pidfile $PIDFILE \
+        --oknodo \
+        --background \
+        --exec $BINARY \
+        --startas $DAEMON \
+        --make-pidfile \
+        --chuid $USER > /dev/null 2>&1 || return 1
     return 0
 }
 
 ufo_stop() {
-    start-stop-daemon --stop --quiet --pidfile $PIDFILE \
-	--oknodo --exec $BINARY || return 1
+    start-stop-daemon \
+        --stop \
+        --quiet \
+        --pidfile $PIDFILE \
+        --oknodo \
+        --exec $BINARY || return 1
     rm -f $PIDFILE
     return 0
 }
@@ -47,42 +57,24 @@ case "$1" in
         log_begin_msg "Starting $DESC: $NAME"
         ufo_start
         log_end_msg $?
-	;;
+    ;;
     stop)
         log_begin_msg "Stopping $DESC: $NAME"
         ufo_stop
         log_end_msg $?
-	;;
-    #reload)
-	#
-	#	If the daemon can reload its config files on the fly
-	#	for example by sending it SIGHUP, do it here.
-	#
-	#	If the daemon responds to changes in its config file
-	#	directly anyway, make this a do-nothing entry.
-	#
-	# echo "Reloading $DESC configuration files."
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
-	#	/var/run/$NAME.pid --exec $DAEMON
-        #;;
+    ;;
     restart|force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
         log_begin_msg "Restarting $DESC: $NAME"
         ufo_stop && sleep 1 && ufo_start
         log_end_msg $?
-	;;
+    ;;
     status)
-	status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
-	;;
+    status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
+    ;;
     *)
-	# echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
-	exit 1
-	;;
+    echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
+    exit 1
+    ;;
 esac
 
 exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ufoai.git



More information about the Pkg-games-commits mailing list