#!/bin/sh # # $FreeBSD: head/databases/foundationdb-devel/files/foundationdb.in 524463 2020-01-28 08:08:01Z dch $ # # 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" foundationdb_enable=${foundationdb_enable:-"NO"} command=%%PREFIX%%/bin/fdbmonitor pidfile="/var/run/fdbmonitor.pid" load_rc_config "$name" : ${foundationdb_enable="NO"} : ${foundationdb_config="%%PREFIX%%/etc/foundationdb/foundationdb.conf"} command_args="--conffile ${foundationdb_config} --lockfile ${pidfile} --daemonize" run_rc_command $1