#!/bin/sh

# $FreeBSD$
#
# PROVIDE: pianod
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable this service:
#
# pianod_enable (bool):    Set to NO by default.
#                          Set it to YES to enable pianod.
# pianod_args (string):    Additional arguments to pianod
#

. /etc/rc.subr

name=pianod
rcvar=pianod_enable

: ${pianod_enable:="NO"}
: ${pianod_args:=""}

pidfile=/var/run/pianod.pid
procname="/usr/local/bin/pianod"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${procname} ${pianod_args}"

load_rc_config ${name}
run_rc_command "$1"
