mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
Update FoundationDB to both main supported versions, and also split between server and client builds for convenience. PR: 277262 Reviewed by: dch Sponsored by: SkunkWerks, GmbH
42 lines
949 B
Bash
42 lines
949 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: foundationdb
|
|
# REQUIRE: LOGIN
|
|
# BEFORE: securelevel
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following line to /etc/rc.conf to enable `foundationdb':
|
|
#
|
|
#foundationdb_enable="YES"
|
|
#
|
|
# Define config file here to run with different config file:
|
|
#
|
|
#foundationdb_config="xxxxx"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="foundationdb"
|
|
rcvar="${name}_enable"
|
|
|
|
load_rc_config "$name"
|
|
|
|
: ${foundationdb_enable="NO"}
|
|
: ${foundationdb_user="%%FOUNDATIONDB_USER%%"}
|
|
: ${foundationdb_group="%%FOUNDATIONDB_GROUP%%"}
|
|
: ${foundationdb_config="%%PREFIX%%/etc/foundationdb/foundationdb.conf"}
|
|
|
|
start_precmd="foundationdb_start_precmd"
|
|
|
|
pidfile="/var/run/fdbmonitor.pid"
|
|
command=%%PREFIX%%/sbin/fdbmonitor
|
|
command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize"
|
|
|
|
foundationdb_start_precmd()
|
|
{
|
|
if [ ! -e "${pidfile}" ]; then
|
|
install -m 0600 -o "${foundationdb_user}" -g "${foundationdb_group}" /dev/null "${pidfile}"
|
|
fi
|
|
}
|
|
|
|
run_rc_command $1
|