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/menu/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/webdir/bin/menu/07_sphinx.sh
#!/usr/bin/bash
#
#set -x
PROGNAME=$(basename $0)
PROGPATH=$(dirname $0)
[[ -z $DEBUG ]] && DEBUG=0

. $PROGPATH/07_sphinx/functions.sh || exit 1

logo=$(get_logo)

create_sphinx_instance() {
    $sphinx_menu_dir/01_create_sphinx_instance.sh
}

create_sphinx_index() {
    $sphinx_menu_dir/02_create_sphinx_index.sh
}

delete_sphinx_instance() {
    $sphinx_menu_dir/03_delete_sphinx_instance.sh
}

# print menu
submenu() {
    submenu_00="$SPH0201"
    submenu_01="$SPH0015"
    submenu_02="$SPH0016"
    submenu_03="$SPH0017"

    SUBMENU_SELECT=
    until [[ -n "$SUBMENU_SELECT" ]]; do
        menu_logo="$SPH0018"
        print_menu_header

        # sphinx servers list
        print_sphinx_servers_status
        # task info
        get_task_by_type '(sphinx|monitor)' POOL_SUBMENU_TASK_LOCK POOL_SUBMENU_TASK_INFO
        print_task_by_type '(sphinx|monitor)' "$POOL_SUBMENU_TASK_LOCK" "$POOL_SUBMENU_TASK_INFO"

        if [[ $POOL_SUBMENU_TASK_LOCK -eq 1 ]];
        then
            menu_list="$submenu_00"
        else
            if [[ $SPHINX_SERVERS_CN -eq 0 ]];
            then
                menu_list="$submenu_01\n\t\t $submenu_00"
            elif [[ ( $SPHINX_SERVERS_CN -gt 0 ) && ( $NOSPHINX_SERVERS_CN -eq 0 ) ]];
            then
                menu_list="$submenu_02\n\t\t $submenu_03\n\t\t $submenu_00"
            else
                menu_list="$submenu_01\n\t\t $submenu_02\n\t\t $submenu_03\n\t\t $submenu_00"
            fi
        fi

        print_menu
        print_message "$SPH0205" '' '' SUBMENU_SELECT

        case "$SUBMENU_SELECT" in
            "1") create_sphinx_instance  ;;
            "2") create_sphinx_index ;;
            "3") delete_sphinx_instance  ;;
            "0") exit ;;
            *) error_pick; SUBMENU_SELECT= ;;
        esac

        SUBMENU_SELECT=
    done
}

submenu

Youez - 2016 - github.com/yon3zu
LinuXploit