summaryrefslogblamecommitdiff
path: root/irc/bopm/files/bopm.in
blob: 96bc4fb8c14c5ffcf17d76841716100bd2505644 (plain) (tree)





































                                                             
#!/bin/sh

# PROVIDE: bopm
# REQUIRE: DAEMON
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable bopm:
# bopm_enable (bool):	Set to "NO" by default.
#			Set it to "YES" to enable bopm.
# bopm_config (str):	Default to "%%PREFIX%%/etc/bopm.conf"
#			Configuration file for bopm.
# bopm_flags (str):	Custom flags passed to the bopm
#			daemon (default empty).
#
. %%RC_SUBR%%

name="bopm"
rcvar=`set_rcvar`

load_rc_config $name

: ${bopm_enable="NO"}
: ${bopm_config="%%PREFIX%%/etc/bopm.conf"}
: ${bopm_flags=""}

bopm_user="bopm"
pidfile="%%LOGDIR%%/bopm.pid"
required_files="${bopm_config}"

# NOTE: bopm behaves differently with or without the -d flag.
# If you choose to use -d, you will probably need to redirect
# stdout and stderr to appropriate places.
#
command="%%PREFIX%%/bin/bopm"
command_args="${bopm_flags} &"

run_rc_command "$1"