[Pkg-ocaml-maint-commits] [SCM] ocsigen packaging branch, master, updated. debian/1.1.0-1-12-gf0765b5

Stephane Glondu steph at glondu.net
Fri Mar 13 17:26:20 UTC 2009


The following commit has been merged in the master branch:
commit 186efc255db9ba9c13222fcb0a0f31de709426a4
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri Mar 13 17:32:03 2009 +0100

    Add status command to initscript

diff --git a/debian/control b/debian/control
index 49e0881..c8d4934 100644
--- a/debian/control
+++ b/debian/control
@@ -24,7 +24,7 @@ Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocsigen.git
 
 Package: ocsigen
 Architecture: any
-Depends: adduser, psmisc,
+Depends: adduser, psmisc, procps,
  ${shlibs:Depends},
  ocaml-nox-${F:OCamlABI},
  ocaml-findlib,
diff --git a/debian/ocsigen.init b/debian/ocsigen.init
index b065c93..0697821 100644
--- a/debian/ocsigen.init
+++ b/debian/ocsigen.init
@@ -59,9 +59,23 @@ case "$1" in
 	$0 stop
 	$0 start
 	;;
+  status)
+        echo -n "Status of $DESC: "
+        if [ ! -r "$PIDFILE" ]; then
+            echo "$NAME is not running."
+            exit 3
+        fi
+        if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+            echo "$NAME is running."
+            exit 0
+        else
+            echo "$NAME is not running but $PIDFILE exists."
+            exit 1
+        fi
+        ;;
   *)
 	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|restart|reload|force-reload|force-start}" >&2
+	echo "Usage: $N {start|stop|restart|reload|force-reload|force-start|status}" >&2
 	exit 1
 	;;
 esac

-- 
ocsigen packaging



More information about the Pkg-ocaml-maint-commits mailing list