summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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