Add an rc script.

Submitted by:	maintainer
This commit is contained in:
Alexey Dokuchaev 2020-12-10 04:59:40 +00:00
parent 72f25029fa
commit cd1065023d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=557412
2 changed files with 63 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= pies
PORTVERSION= 1.4
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://download.gnu.org.ua/pub/release/${PORTNAME}/ \
http://download.gnu.org.ua/pub/alpha/${PORTNAME}/
@ -14,6 +15,7 @@ LICENSE= GPLv3+
USES= charsetfix iconv tar:bz2
GNU_CONFIGURE= yes
USE_RC_SUBR= ${PORTNAME}
INFO= ${PORTNAME}
PORTDOCS= ChangeLog NEWS README

View File

@ -0,0 +1,61 @@
#!/bin/sh
#
# $FreeBSD$
#
# 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"