[BACK]Return to rc.template CVS log [TXT][DIR] Up to [local] / ports / infrastructure / templates

File: [local] / ports / infrastructure / templates / rc.template (download)

Revision 1.10, Fri Jun 10 21:14:37 2016 UTC (19 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.9: +5 -4 lines

Extend rc.d template with daemon_rtable.

Below is an rc.d(8) script template containing all usable variables and
functions set to their defaults.
See rc.subr(8) for more information.

-----------------------------------8<-----------------------------------
#!/bin/sh
#
# $OpenBSD: rc.template,v 1.10 2016/06/10 21:14:37 ajacoutot Exp $

daemon="${TRUEPREFIX}/bin/foobar"
#daemon_flags=
#daemon_rtable=0
#daemon_timeout="30"
#daemon_user="root"

. /etc/rc.d/rc.subr

#pexp="${daemon}${daemon_flags:+ ${daemon_flags}}"
#rc_bg= # (undefined)
#rc_reload= # (undefined)
#rc_usercheck=YES

#rc_pre() {
#}

#rc_start() {
#	${rcexec} "${daemon} ${daemon_flags} ${_bg}"
#}

#rc_check() {
#	pgrep -T "${daemon_rtable}" -q -xf "${pexp}"
#}

#rc_reload() {
#	pkill -HUP -T "${daemon_rtable}" -xf "${pexp}"
#}

#rc_stop() {
#	pkill -T "${daemon_rtable}" -xf "${pexp}"
#}

#rc_post() {
#}

rc_cmd $1
-----------------------------------8<-----------------------------------