Browse code

making debian sems.init lsb compliant

Patch by Jon Bonilla

Stefan Sayer authored on 28/02/2011 15:56:19
Showing 1 changed files
... ...
@@ -56,18 +56,20 @@ export LD_LIBRARY_PATH
56 56
 
57 57
 set -e
58 58
 
59
+. /lib/lsb/init-functions
60
+
59 61
 case "$1" in
60 62
   start)
61 63
 	echo "Starting $DESC: $NAME"
62
-	start-stop-daemon --start --quiet --pidfile $SEMS_PIDFILE \
64
+	start-stop-daemon --start --quiet --oknodo --pidfile $SEMS_PIDFILE \
63 65
 		--exec $DAEMON -- $PARAMS
64
-	echo "."
66
+	log_end_msg $?
65 67
 	;;
66 68
   stop)
67 69
 	echo -n "Stopping $DESC: $NAME"
68 70
 	start-stop-daemon --oknodo --stop --quiet --pidfile $SEMS_PIDFILE \
69 71
 		--exec $DAEMON
70
-	echo "."
72
+	log_end_msg $?
71 73
 	;;
72 74
   #reload)
73 75
 	#
... ...
@@ -104,10 +106,13 @@ case "$1" in
104 106
 		$SEMS_PIDFILE --exec $DAEMON  -- $PARAMS
105 107
 	echo "."
106 108
 	;;
109
+  status)
110
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
111
+       ;;
107 112
   *)
108 113
 	N=/etc/init.d/$NAME
109 114
 	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
110
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
115
+	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
111 116
 	exit 1
112 117
 	;;
113 118
 esac