summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-31 10:28:56 -0300
committerdrebs <drebs@leap.se>2013-05-31 14:57:15 -0300
commit626c83924a81c436cf5374b6ee7a448031fdc6ae (patch)
treecdf7e01aae0b3eab957aea1af5f5e9149b906552
parentaa36b326842be61a3063185e28a25a6fbf8270c9 (diff)
Add 'status' option to init script.
-rw-r--r--changes/feature_add-status-to-initscript1
-rw-r--r--pkg/soledad8
2 files changed, 8 insertions, 1 deletions
diff --git a/changes/feature_add-status-to-initscript b/changes/feature_add-status-to-initscript
new file mode 100644
index 00000000..ff264091
--- /dev/null
+++ b/changes/feature_add-status-to-initscript
@@ -0,0 +1 @@
+ o Add a `status` option to Soledad init script.
diff --git a/pkg/soledad b/pkg/soledad
index cdffe19f..036b76da 100644
--- a/pkg/soledad
+++ b/pkg/soledad
@@ -16,6 +16,8 @@ privkey_path=/etc/leap/soledad-server.pem
test -r /etc/leap/ || exit 0
+. /lib/lsb/init-functions
+
case "$1" in
start)
@@ -49,8 +51,12 @@ case "$1" in
$0 restart
;;
+ status)
+ status_of_proc -p $pidfile /usr/local/bin/twistd soledad && exit 0 || exit $?
+ ;;
+
*)
- echo "Usage: /etc/init.d/soledad {start|stop|restart|force-reload}" >&2
+ echo "Usage: /etc/init.d/soledad {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac