#!/bin/sh
#
# $NetBSD: ympd.sh,v 1.1 2021/07/20 06:37:18 nia Exp $
#
# PROVIDE: ympd
# REQUIRE: DAEMON

. /etc/rc.subr

name="ympd"
rcvar=${name}
pidfile="/var/run/${name}.pid"
procname="/usr/pkg/bin/ympd"
command="/usr/pkg/sbin/daemonize"
command_args="${command_args} -p ${pidfile}"
command_args="${command_args} -o /var/log/ympd/stdout.log"
command_args="${command_args} -e /var/log/ympd/stderr.log"
command_args="${command_args} ${procname}"
command_args="${command_args} -u ympd"

load_rc_config $name
run_rc_command "$1"
