#!/sbin/openrc-run

description="SNClient (Secure Naemon Client)"
supervisor="supervise-daemon"
command="/usr/bin/snclient"
command_args="--config /etc/snclient/snclient.ini"
command_args_background="--pidfile ${pidfile} daemon"
command_user="snclient:snclient"
pidfile="/run/snclient/snclient.pid"
directory="/var/lib/snclient"

start_pre() {
    checkpath --directory --owner snclient:snclient --mode 0755 /run/snclient
}

reload() {
  ebegin "Reloading snclient configuration"
  ${supervisor} ${RC_SVCNAME} --signal HUP --pidfile "${pidfile}"
  eend $?
}

depend() {
    need net
}