#!/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
}
