ports/databases/foundationdb71-server/files/foundationdb.in
Dmitry Wagin 3dc4928b6c databases/foundationdb*: split, update to 7.1.59 & 7.3.41
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
2024-05-23 22:14:48 +00:00

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