openbsd-ports/infrastructure/templates/rc.template

46 lines
893 B
Plaintext
Raw Normal View History

Below is an rc.d(8) script template containing all usable variables and
functions set to their defaults.
2011-03-03 10:55:43 -05:00
See rc.subr(8) for more information.
2011-03-03 10:55:43 -05:00
-----------------------------------8<-----------------------------------
#!/bin/sh
#
2011-03-06 11:50:11 -05:00
# $OpenBSD: rc.template,v 1.4 2011/03/06 16:50:11 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/foobar"
#daemon_flags=""
#daemon_user="root"
. /etc/rc.d/rc.subr
#pexp="${daemon}${daemon_flags:+ ${daemon_flags}}"
2011-03-06 11:50:11 -05:00
#rc_bg= # (undefined)
#rc_reload= # (undefined)
#rc_pre() {
#}
#rc_start() {
# type rc_pre >/dev/null && rc_pre
# ${rcexec} "${daemon} ${daemon_flags}" >/dev/null
#}
#rc_check() {
# pgrep -f "^${pexp}" >/dev/null
#}
#rc_reload() {
# pkill -HUP -f "^${pexp}"
#}
#rc_stop() {
# pkill -f "^${pexp}"
# type rc_post >/dev/null && rc_post || return 0
#}
#rc_post() {
#}
rc_cmd $1
2011-03-03 10:55:43 -05:00
-----------------------------------8<-----------------------------------