aboutsummaryrefslogtreecommitdiff
path: root/net/openelp/files/openelp.init
diff options
context:
space:
mode:
Diffstat (limited to 'net/openelp/files/openelp.init')
-rwxr-xr-xnet/openelp/files/openelp.init30
1 files changed, 30 insertions, 0 deletions
diff --git a/net/openelp/files/openelp.init b/net/openelp/files/openelp.init
new file mode 100755
index 000000000..a6640eb5c
--- /dev/null
+++ b/net/openelp/files/openelp.init
@@ -0,0 +1,30 @@
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=10
+
+USE_PROCD=1
+
+NAME="openelp"
+PROG="/usr/bin/openelpd"
+CONFFILE="/etc/ELProxy.conf"
+
+extra_command "close" "Close the proxy to new connections"
+extra_command "version" "Show version information"
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_append_param command -F -q -S "$CONFFILE"
+ procd_set_param stderr 1
+ procd_set_param file "$CONFFILE"
+ procd_close_instance
+}
+
+close() {
+ procd_send_signal openelp '*' USR1
+}
+
+version() {
+ "$PROG" -V
+}