403Webshell
Server IP : 104.129.129.72  /  Your IP : 216.73.216.229
Web Server : LiteSpeed
System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : answe8064 ( 1002)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/installer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/installer/installer-contrib-ubuntu_mate_22_24-desktop-xrdp-osrepo.conf
#/bin/bash

# This is the config file where we define what will be executed in the installer script.
#
# installer will read variables and will execute them one by one.
#

if [ -f "include/startup.sh" ]; then
    . include/startup.sh

elif [ -f "../include/startup.sh" ]; then
    . ../include/startup.sh
fi


disable_guest_session() {
    CONFIG="/etc/lightdm/lightdm.conf.d/91-arctica-greeter-guest-session.conf"
    echo "Disabling guest session..." | log

    # Check if the configuration file exists
    if [[ ! -f "$CONFIG" ]]; then
    echo "Configuration file $CONFIG not found!" | log
    exit 1
    fi

    # Update allow-guest to false
    if sed -i 's/^\(allow-guest\s*=\s*\).*$/\1false/' "$CONFIG"; then
    echo "Updated allow-guest successfully." | log
    else
    echo "Failed to update allow-guest." | log
    exit 1
    fi

    # Update greeter-allow-guest to false
    if sed -i 's/^\(greeter-allow-guest\s*=\s*\).*$/\1false/' "$CONFIG"; then
    echo "Updated greeter-allow-guest successfully." | log
    else
    echo "Failed to update greeter-allow-guest." | log
    exit 1
    fi
    
    echo "Guest session disabled successfully."
}

# Define execute list
declare -a steps=(
    "include/installInProgressSSH"
	"tweaks/ubuntu-ufw-enable"
	"tweaks/ubuntu-updateos"
    "services/ubuntu-mate-desktop-osrepo"
    "services/xrdp-osrepo"
    "services/ubuntu-desktop-chrome-offirepo"
    disable_guest_session
    "tweaks/ubuntu-ufw-allowrdp"
    "include/installInProgressSSH-remove"
	"tweaks/cwm-description-autoconfig"
)

for run in "${steps[@]}"; do
    printf "Executing %s\n" "$run" | log
    if ! $run; then
        script_exit_code=$?
        printf "Exit Code: %d\n" "$script_exit_code" | log

        case "$script_exit_code" in
            0)   printf "Done. (0)\n" | log ;;
            1)   printf "Error during %s. Exiting.\n" "$run" | log
                 exit 1
                 ;;
            98)  printf "Exit Code 98. Script already executed, can run only once. Continuing. (98)\n" | log ;;
            99)  printf "Exit Code 99. Continuing. (99)\n" | log ;;
            127) printf "Error. %s not found. Exiting. (127)\n" "$run" | log
                 exit 1
                 ;;
            *)   printf "Exit Code not configured. Exiting. (%d)\n" "$script_exit_code" | log
                 exit 1
                 ;;
        esac
    fi
done

tagScript success
exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit