5b6c7671ef
put the pidfile there. Tested by: Michael D <me@md-5.net>
38 lines
851 B
Bash
38 lines
851 B
Bash
#!/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=bopm_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${bopm_enable="NO"}
|
|
: ${bopm_config="%%PREFIX%%/etc/bopm.conf"}
|
|
|
|
bopm_user="bopm"
|
|
pidfile="/var/run/bopm/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"
|