#!/sbin/openrc-run
  
name=$RC_SVCNAME
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
pidfile="/var/run/$RC_SVCNAME.pid"
supervisor="supervise-daemon"
command="/usr/bin/scantopl"
command_args="-pltoken $SCANTOPL_PLTOKEN -plurl $SCANTOPL_PLURL -scandir $SCANTOPL_SCANDIR ${SCANTOPL_EXTRAOPTS}"
command_user="$SCANTOPL_USER"
command_group="$SCANTOPL_GROUP"
start_stop_daemon_args=""
command_background="yes"
output_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.log"
error_log="/var/log/$RC_SVCNAME/$RC_SVCNAME.err"

depend() {
	after saned
}

start_pre() {
        checkpath --directory --owner $command_user:$command_group --mode 0775 \
                /var/run/$RC_SVCNAME \
		/var/log/$RC_SVCNAME
}
