403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/graylog/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/graylog/files/graylog.in
#!/bin/sh
#
# PROVIDE: graylog
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#

# graylog_enable (bool):
#   Default value: "NO"
#   Flag that determines whether graylog is enabled
#
# graylog_user (username):
#   Default value: "graylog"
#   Name of the graylog user account
#
# graylog_group (group):
#   Default value: "graylog"
#   Name of the graylog group
#
# graylog_config (string)
#   Default value %%ETCDIR%%/server/server.conf
#   Path to the graylog configuration file
#
# graylog_min_mem (string):
#   Default value: 256m
#   Minumum JVM heap size
#
# graylog_max_mem (string):
#   Default value: 1g
#   Maximum JVM heap size
#
# graylog_dir (string):
#   Default value: %%DATADIR%%
#   Path to the graylog installation.
#
# graylog_data_dir (string):
#   Default vaule: %%GRAYLOG_DATA_DIR%%
#   Storage location for the graylog journal
#
# graylog_run_dir (string):
#   Default value: /var/graylog
#   Path to the graylog run folder.
#
# graylog_log_config (string):
#   Default value: %%ETCDIR%%/server/log4j2.xml
#   Path to the Graylog Server logfile

. /etc/rc.subr

name=graylog
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_logs_dir:="%%GRAYLOG_LOGS_DIR%%"}
: ${graylog_run_dir:="/var/run/graylog"}
: ${graylog_log_config:="%%ETCDIR%%/log4j2.xml"}

java_options=" \
    -Djava.awt.headless=true \
    -Dapp=${name} \
    -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:NewRatio=1 \
    "

app_pidfile="${graylog_run_dir}/${name}.pid"
pidfile="${graylog_run_dir}/daemon.pid"
command="/usr/sbin/daemon"

command_args=" \
    -c \
    -t ${name} \
    -r \
    -p ${app_pidfile} \
    -P ${pidfile} \
    %%LOCALBASE%%/bin/java \
    ${java_options} \
    -jar ${graylog_dir}/graylog.jar server \
    --no-pid-file \
    --configfile ${graylog_config}"

required_files="%%LOCALBASE%%/bin/java ${graylog_config}"

graylog_precmd() {
    install -d -o ${graylog_user} -g ${graylog_group} -m 750 "${graylog_data_dir}"
    install -d -o ${graylog_user} -g ${graylog_group} -m 750 "${graylog_logs_dir}"
    install -d -o ${graylog_user} -g ${graylog_group} -m 750 "${graylog_run_dir}"
}

start_precmd="graylog_precmd"

run_rc_command "$1"

Youez - 2016 - github.com/yon3zu
LinuXploit