aboutsummaryrefslogtreecommitdiff
path: root/textproc/opensearch/files/opensearch.in
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/opensearch/files/opensearch.in')
-rw-r--r--textproc/opensearch/files/opensearch.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/textproc/opensearch/files/opensearch.in b/textproc/opensearch/files/opensearch.in
index 71334ce1ee01..288959f2e9a9 100644
--- a/textproc/opensearch/files/opensearch.in
+++ b/textproc/opensearch/files/opensearch.in
@@ -17,6 +17,13 @@
# Set it to the config file location.
# opensearch_java_home (path): Set to %%JAVA_HOME%% by default.
# Set it to the root of the JDK to use.
+# opensearch_flags (): Set to "" by default.
+# Configure temporary startup flags
+# Format: "-Enetwork.host=0.0.0.0 -Ediscovery.type=single-node"
+# See: docs.opensearch.org/latest/install-and-configure/configuring-opensearch/index/
+# opensearch_env (): Set to "" by default.
+# Configure environment
+# Format: "OPENSEARCH_INITIAL_ADMIN_PASSWORD=Secret!Password1"
#
. /etc/rc.subr
@@ -31,6 +38,8 @@ load_rc_config ${name}
: ${opensearch_config=%%PREFIX%%/etc/opensearch}
: ${opensearch_login_class=root}
: ${opensearch_java_home="%%JAVA_HOME%%"}
+: ${opensearch_flags=""}
+: ${opensearch_env=""}
required_files="${opensearch_config}/opensearch.yml"
_pidprefix=/var/run/opensearch/opensearch
@@ -46,6 +55,10 @@ command_args="-d --pidfile=${pidfile}"
export OPENSEARCH_PATH_CONF=${opensearch_config}
export JAVA_HOME=${opensearch_java_home}
+if [ -n "${opensearch_env}" ]; then
+ export ${opensearch_env}
+fi
+
opensearch_precmd()
{
/usr/bin/install -d -o ${opensearch_user} -g ${opensearch_group} -m 755 ${pidfile%/*}