ports/sysutils/pies/files/pies.in
Alexey Dokuchaev 9073f9611b sysutils/pies: update the port to version 1.8
Reported by:	maintainer
2022-08-14 08:08:12 +00:00

59 lines
767 B
Bash

#!/bin/sh
#
# PROVIDE: pies
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name="pies"
rcvar=pies_enable
command="%%PREFIX%%/sbin/${name}"
ctlcommand="%%PREFIX%%/bin/${name}ctl"
pidfile="/var/run/${name}/${name}.pid"
: ${pies_enable="NO"}
start_cmd="${name}_start"
reload_cmd="${name}_reload"
restart_cmd="${name}_restart"
status_cmd="${name}_status"
stop_cmd="${name}_stop"
configtest_cmd="${name}_configtest"
extra_commands="reload configtest"
pies_start()
{
${command}
}
pies_reload()
{
${ctlcommand} -v config reload
}
pies_restart()
{
${ctlcommand} reboot
}
pies_status()
{
${ctlcommand} -v list
}
pies_stop()
{
${ctlcommand} shutdown
}
pies_configtest()
{
${command} --lint
}
load_rc_config ${name}
run_rc_command "$1"