summaryrefslogtreecommitdiff
path: root/irc/bopm/files/bopm.in
blob: 95d040dcf17721abfa328d346a9f04941a0ca513 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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).
#
. /etc/rc.subr

name="bopm"
rcvar=`set_rcvar`

load_rc_config $name

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

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"