diff options
Diffstat (limited to 'sysutils/graylog/files/graylog.in')
-rw-r--r-- | sysutils/graylog/files/graylog.in | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/sysutils/graylog/files/graylog.in b/sysutils/graylog/files/graylog.in index 3530a2a57120..aff849de8e10 100644 --- a/sysutils/graylog/files/graylog.in +++ b/sysutils/graylog/files/graylog.in @@ -19,7 +19,7 @@ # Name of the graylog group # # graylog_config (string) -# Default value %%ETCDIR%%/server/server.conf +# Default value %%ETCDIR%%/graylog.conf # Path to the graylog configuration file # # graylog_min_mem (string): @@ -45,6 +45,10 @@ # graylog_log_config (string): # Default value: %%ETCDIR%%/server/log4j2.xml # Path to the Graylog Server logfile +# +# graylog_java_home (path): +# Default value: %%JAVA_HOME%% +# Set it to the root of the JDK to use. . /etc/rc.subr @@ -53,38 +57,31 @@ rcvar=graylog_enable load_rc_config $name : ${graylog_enable:="NO"} -: ${graylog_user:="%%GRAYLOGUSER%%"} -: ${graylog_group:="%%GRAYLOGGROUP%%"} : ${graylog_config:="%%ETCDIR%%/graylog.conf"} -: ${graylog_min_mem:="256m"} -: ${graylog_max_mem:="1g"} -: ${graylog_dir:="%%DATADIR%%"} : ${graylog_data_dir:="%%GRAYLOG_DATA_DIR%%"} +: ${graylog_dir:="%%DATADIR%%"} +: ${graylog_group:="%%GRAYLOGGROUP%%"} +: ${graylog_java_home:="%%JAVA_HOME%%"} +: ${graylog_java_opts:=""} +: ${graylog_log_config:="%%ETCDIR%%/log4j2.xml"} : ${graylog_logs_dir:="%%GRAYLOG_LOGS_DIR%%"} +: ${graylog_max_mem:="1g"} +: ${graylog_min_mem:="256m"} : ${graylog_run_dir:="/var/run/graylog"} -: ${graylog_log_config:="%%ETCDIR%%/log4j2.xml"} +: ${graylog_user:="%%GRAYLOGUSER%%"} java_options=" \ - -Djava.awt.headless=true \ -Dapp=${name} \ + -Djava.awt.headless=true \ -Dlog4j.configurationFile=${graylog_log_config} \ - -Xms${graylog_min_mem} \ - -Xmx${graylog_max_mem} \ - -XX:-OmitStackTraceInFastThrow \ - -XX:+AggressiveOpts \ - -XX:+CMSClassUnloadingEnabled \ - -XX:+CMSConcurrentMTEnabled \ - -XX:+CMSParallelRemarkEnabled \ - -XX:+DisableExplicitGC \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:+ResizeTLAB \ - -XX:+UseCMSInitiatingOccupancyOnly \ -XX:+UseCompressedOops \ - -XX:+UseConcMarkSweepGC \ - -XX:+UseFastAccessorMethods \ - -XX:+UseParNewGC \ - -XX:CMSInitiatingOccupancyFraction=75 \ + -XX:-OmitStackTraceInFastThrow \ -XX:NewRatio=1 \ + -Xms${graylog_min_mem} \ + -Xmx${graylog_max_mem} \ + ${graylog_java_opts} \ " app_pidfile="${graylog_run_dir}/${name}.pid" @@ -103,6 +100,8 @@ command_args=" \ --no-pid-file \ --configfile ${graylog_config}" +export JAVA_HOME=${graylog_java_home} + required_files="%%LOCALBASE%%/bin/java ${graylog_config}" graylog_precmd() { |