mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 15:36:35 -04:00
- Attached a patch to fix the TERM handling issue in SConstruct [1] - Added "ldconfig" to the rc.d script to start mongod correctly if running in a jail [1] - Remove unsupported FreeBSD version stuff - Replace pkg-install and pkg-deinstall with USERS and GROUPS in Makefile PR: ports/156297 [1] Submitted by: Mirko Zinn <mail AT derzinn.de> (maintainer)
40 lines
1 KiB
Bash
40 lines
1 KiB
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: mongod
|
|
# REQUIRE: NETWORK ldconfig
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# mongod_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable mongod.
|
|
#
|
|
# Additional configurable variables:
|
|
# mongod_config (path): Set to %%PREFIX%%/etc/mongodb.conf
|
|
# by default. Additional configuration. You
|
|
# can also use mongod_flags for additional
|
|
# command line arguments.
|
|
# mongod_dbpath (path): Set to /var/db/mongodb by default
|
|
# mongod_user (username): Set to "mongodb" by default
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="mongod"
|
|
rcvar=${name}_enable
|
|
|
|
command=%%PREFIX%%/bin/${name}
|
|
|
|
load_rc_config $name
|
|
|
|
: ${mongod_enable="NO"}
|
|
: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
|
|
: ${mongod_dbpath="/var/db/mongodb"}
|
|
: ${mongod_user="mongodb"}
|
|
|
|
command_args="-f $mongod_config --dbpath $mongod_dbpath --logappend --logpath $mongod_dbpath/mongod.log --fork"
|
|
|
|
required_dirs=${mongod_dbpath}
|
|
|
|
run_rc_command "$1"
|
|
|