Update irc/bopm to version 3.1.3_2
[dports.git] / irc / bopm / files / bopm.in
1 #!/bin/sh
2
3 # PROVIDE: bopm
4 # REQUIRE: DAEMON
5 # KEYWORD: shutdown
6
7 #
8 # Add the following line to /etc/rc.conf to enable bopm:
9 # bopm_enable (bool):   Set to "NO" by default.
10 #                       Set it to "YES" to enable bopm.
11 # bopm_config (str):    Default to "%%PREFIX%%/etc/bopm.conf"
12 #                       Configuration file for bopm.
13 # bopm_flags (str):     Custom flags passed to the bopm
14 #                       daemon (default empty).
15 #
16 . /etc/rc.subr
17
18 name="bopm"
19 rcvar=bopm_enable
20
21 load_rc_config $name
22
23 : ${bopm_enable="NO"}
24 : ${bopm_config="%%PREFIX%%/etc/bopm.conf"}
25
26 bopm_user="bopm"
27 pidfile="/var/run/bopm.pid"
28 required_files="${bopm_config}"
29
30 # NOTE: bopm behaves differently with or without the -d flag.
31 # If you choose to use -d, you will probably need to redirect
32 # stdout and stderr to appropriate places.
33 #
34 command="%%PREFIX%%/bin/bopm"
35 command_args="${bopm_flags} &"
36
37 run_rc_command "$1"