diff options
author | drebs <drebs@leap.se> | 2013-05-31 10:28:56 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-05-31 14:57:15 -0300 |
commit | 626c83924a81c436cf5374b6ee7a448031fdc6ae (patch) | |
tree | cdf7e01aae0b3eab957aea1af5f5e9149b906552 | |
parent | aa36b326842be61a3063185e28a25a6fbf8270c9 (diff) |
Add 'status' option to init script.
-rw-r--r-- | changes/feature_add-status-to-initscript | 1 | ||||
-rw-r--r-- | pkg/soledad | 8 |
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 |