feat(linuxgsm): various ui improvements (#2554)

* added column to debug
* added colour to header
* colourised LinuxGSM header text
* updated donate message
* ascii logo
* warn colour and altered header
This commit is contained in:
Daniel Gibbs 2019-10-14 00:37:43 +01:00 committed by GitHub
parent 7a3fa84fa6
commit 7059d9a6cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 2010 additions and 1967 deletions

View File

@ -145,7 +145,7 @@ glibc="2.15"
## Server Specific Directories
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable=$([ "$(uname -m)" == "x86_64" ] && echo "./Hurtworld.x86_64" || echo "./Hurtworld.x86")
executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./Hurtworld.x86_64" || echo -e "./Hurtworld.x86")
## Backup Directory
backupdir="${lgsmdir}/backup"

View File

@ -128,7 +128,7 @@ glibc="2.15"
## Server Specific Directories
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable=$([ "$(uname -m)" == "x86_64" ] && echo "./run_server_x64.sh" || echo "./run_server_x86.sh")
executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./run_server_x64.sh" || echo -e "./run_server_x86.sh")
servercfg="${servicename}.cfg"
servercfgdefault="server.cfg"
servercfgdir="${serverfiles}/baseq3"

View File

@ -129,7 +129,7 @@ glibc="2.15"
## Server Specific Directories
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable=$([ "$(uname -m)" == "x86_64" ] && echo "./7DaysToDieServer.x86_64" || echo "./7DaysToDieServer.x86")
executable=$([ "$(uname -m)" == "x86_64" ] && echo -e "./7DaysToDieServer.x86_64" || echo -e "./7DaysToDieServer.x86")
servercfgdefault="serverconfig.xml"
servercfgdirdefault="${serverfiles}"
servercfgfullpathdefault="${servercfgdirdefault}/${servercfgdefault}"

View File

@ -118,7 +118,7 @@ elif [ "${discordalert}" != "on" ]&&[ "${function_selfname}" == "command_test_al
fn_script_log_warn "Discord alerts not enabled"
elif [ -z "${discordtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Discord token not set"
echo " * https://docs.linuxgsm.com/alerts/discord"
echo -e " * https://docs.linuxgsm.com/alerts/discord"
fn_script_error "Discord token not set"
fi
@ -139,7 +139,7 @@ elif [ "${iftttalert}" != "on" ]&&[ "${function_selfname}" == "command_test_aler
fn_script_log_warn "IFTTT alerts not enabled"
elif [ -z "${ifttttoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "IFTTT token not set"
echo " * https://docs.linuxgsm.com/alerts/ifttt"
echo -e " * https://docs.linuxgsm.com/alerts/ifttt"
fn_script_error "IFTTT token not set"
fi
@ -150,7 +150,7 @@ elif [ "${mailgunalert}" != "on" ]&&[ "${function_selfname}" == "command_test_al
fn_script_log_warn "Mailgun alerts not enabled"
elif [ -z "${mailguntoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Mailgun token not set"
echo " * https://docs.linuxgsm.com/alerts/mailgun"
echo -e " * https://docs.linuxgsm.com/alerts/mailgun"
fn_script_error "Mailgun token not set"
fi
@ -161,7 +161,7 @@ elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test
fn_script_log_warn "Pushbullet alerts not enabled"
elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Pushbullet token not set"
echo " * https://docs.linuxgsm.com/alerts/pushbullet"
echo -e " * https://docs.linuxgsm.com/alerts/pushbullet"
fn_script_error "Pushbullet token not set"
fi
@ -172,7 +172,7 @@ elif [ "${pushoveralert}" != "on" ]&&[ "${function_selfname}" == "command_test_a
fn_script_log_warn "Pushover alerts not enabled"
elif [ -z "${pushovertoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Pushover token not set"
echo " * https://docs.linuxgsm.com/alerts/pushover"
echo -e " * https://docs.linuxgsm.com/alerts/pushover"
fn_script_error "Pushover token not set"
fi
@ -183,11 +183,11 @@ elif [ "${telegramalert}" != "on" ]&&[ "${function_selfname}" == "command_test_a
fn_script_log_warn "Telegram Messages not enabled"
elif [ -z "${telegramtoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Telegram token not set."
echo " * https://docs.linuxgsm.com/alerts/telegram"
echo -e " * https://docs.linuxgsm.com/alerts/telegram"
fn_script_error "Telegram token not set."
elif [ -z "${telegramchatid}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Telegram chat id not set."
echo " * https://docs.linuxgsm.com/alerts/telegram"
echo -e " * https://docs.linuxgsm.com/alerts/telegram"
fn_script_error "Telegram chat id not set."
fi
@ -198,6 +198,6 @@ elif [ "${slackalert}" != "on" ]&&[ "${function_selfname}" == "command_test_aler
fn_script_log_warn "Slack alerts not enabled"
elif [ -z "${slacktoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
fn_print_error_nl "Slack token not set"
echo " * https://docs.linuxgsm.com/alerts/slack"
echo -e " * https://docs.linuxgsm.com/alerts/slack"
fn_script_error "Slack token not set"
fi

View File

@ -11,7 +11,7 @@ if [ ! -e "${servercfgfullpath}" ]; then
if [ "${shortname}" != "hw" ]&&[ "${shortname}" != "ut3" ]&&[ "${shortname}" != "kf2" ]; then
fn_print_dots ""
fn_print_warn_nl "Configuration file missing!"
echo "${servercfgfullpath}"
echo -e "${servercfgfullpath}"
fn_script_log_warn "Configuration file missing!"
fn_script_log_warn "${servercfgfullpath}"
install_config.sh
@ -22,14 +22,14 @@ if [ "${shortname}" == "rust" ]; then
if [ -z "${rconpassword}" ]; then
fn_print_dots ""
fn_print_fail_nl "RCON password is not set!"
echo " * Not setting an RCON password causes issues with ${gamename}"
echo -e " * Not setting an RCON password causes issues with ${gamename}"
fn_script_log_fatal "RCON password is not set"
fn_script_log_fatal "Not setting an RCON password causes issues with ${gamename}"
core_exit.sh
elif [ "${rconpassword}" == "CHANGE_ME" ]; then
fn_print_dots ""
fn_print_warn_nl "Default RCON Password detected!"
echo " * Having ${rconpassword} as a password is not very safe."
echo -e " * Having ${rconpassword} as a password is not very safe."
fn_script_log_warn "Default RCON Password detected"
fi
fi

View File

@ -36,9 +36,9 @@ fn_install_mono_repo(){
eval ${cmd}
else
fn_print_warn_nl "Installing Mono repository"
echo "Mono auto install not available for ${distroname}"
echo " Follow instructions on mono site to install the latest version of Mono."
echo " https://www.mono-project.com/download/stable/#download-lin"
echo -e "Mono auto install not available for ${distroname}"
echo -e " Follow instructions on mono site to install the latest version of Mono."
echo -e " https://www.mono-project.com/download/stable/#download-lin"
monoautoinstall="1"
fi
elif [ "${distroid}" == "debian" ]; then
@ -52,9 +52,9 @@ fn_install_mono_repo(){
cmd="sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF;sudo apt install apt-transport-https;echo 'deb https://download.mono-project.com/repo/debian stable-jessie main' | sudo tee /etc/apt/sources.list.d/mono-official-stable.list;sudo apt update"
eval ${cmd}
else
echo "Mono auto install not available for ${distroname}"
echo " Follow instructions on mono site to install the latest version of Mono."
echo " https://www.mono-project.com/download/stable/#download-lin"
echo -e "Mono auto install not available for ${distroname}"
echo -e " Follow instructions on mono site to install the latest version of Mono."
echo -e " https://www.mono-project.com/download/stable/#download-lin"
monoautoinstall="1"
fi
elif [ "${distroid}" == "centos" ]; then
@ -68,18 +68,18 @@ fn_install_mono_repo(){
cmd="rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF';su -c 'curl https://download.mono-project.com/repo/centos6-stable.repo | tee /etc/yum.repos.d/mono-centos6-stable.repo'"
eval ${cmd}
else
echo "Mono auto install not available for ${distroname}"
echo " Follow instructions on mono site to install the latest version of Mono."
echo " https://www.mono-project.com/download/stable/#download-lin"
echo -e "Mono auto install not available for ${distroname}"
echo -e " Follow instructions on mono site to install the latest version of Mono."
echo -e " https://www.mono-project.com/download/stable/#download-lin"
monoautoinstall="1"
fi
elif [ "${distroid}" == "fedora" ]; then
cmd="rpm --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF'; su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo'; dnf update"
eval ${cmd}
else
echo "Mono auto install not available for ${distroname}"
echo " Follow instructions on mono site to install the latest version of Mono."
echo " https://www.mono-project.com/download/stable/#download-lin"
echo -e "Mono auto install not available for ${distroname}"
echo -e " Follow instructions on mono site to install the latest version of Mono."
echo -e " https://www.mono-project.com/download/stable/#download-lin"
monoautoinstall="1"
fi
if [ "${monoautoinstall}" != "1" ];then
@ -95,11 +95,11 @@ fn_install_mono_repo(){
fi
else
fn_print_information_nl "Installing Mono repository"
echo ""
echo -e ""
fn_print_warning_nl "$(whoami) does not have sudo access. Manually install Mono repository."
fn_script_log_warn "$(whoami) does not have sudo access. Manually install Mono repository."
echo " Follow instructions on mono site to install the latest version of Mono."
echo " https://www.mono-project.com/download/stable/#download-lin"
echo -e " Follow instructions on mono site to install the latest version of Mono."
echo -e " https://www.mono-project.com/download/stable/#download-lin"
fi
fi
}
@ -134,8 +134,8 @@ fn_install_universe_repo(){
else
fn_print_warning_nl "$(whoami) does not have sudo access. Manually add Universe repository."
fn_script_log_warn "$(whoami) does not have sudo access. Manually add Universe repository."
echo " Please run the following command as a user with sudo access, and re-run the installation"
echo " sudo apt-add-repository universe"
echo -e " Please run the following command as a user with sudo access, and re-run the installation"
echo -e " sudo apt-add-repository universe"
fi
fi
}
@ -238,7 +238,7 @@ fn_found_missing_deps(){
fi
if [ -n "${jqstatus}" ]; then
fn_print_warning_nl "jq is not available in the ${distroname} repository"
echo " * https://docs.linuxgsm.com/requirements/jq"
echo -e " * https://docs.linuxgsm.com/requirements/jq"
fi
if [ "${autoinstall}" == "1" ]; then
sudo -n true > /dev/null 2>&1
@ -268,18 +268,18 @@ fn_found_missing_deps(){
if [ $? != 0 ]; then
fn_print_failure_nl "Unable to install dependencies"
fn_script_log_fatal "Unable to install dependencies"
echo ""
echo -e ""
fn_print_warning_nl "Manually install dependencies."
fn_script_log_warn "Manually install dependencies."
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
echo " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
elif [ -n "$(command -v dnf 2>/dev/null)" ]; then
echo " sudo dnf install ${array_deps_missing[@]}"
echo -e " sudo dnf install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum 2>/dev/null)" ]; then
echo " sudo yum install ${array_deps_missing[@]}"
echo -e " sudo yum install ${array_deps_missing[@]}"
fi
if [ "${steamcmdfail}" ]; then
echo ""
echo -e ""
fn_print_failure_nl "Missing dependencies required to run SteamCMD."
fn_script_log_fatal "Missing dependencies required to run SteamCMD."
core_exit.sh
@ -289,23 +289,23 @@ fn_found_missing_deps(){
fn_script_log_pass "Install dependencies completed"
fi
else
echo ""
echo -e ""
fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies."
fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies."
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
echo " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
elif [ -n "$(command -v dnf 2>/dev/null)" ]; then
echo " sudo dnf install ${array_deps_missing[@]}"
echo -e " sudo dnf install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum 2>/dev/null)" ]; then
echo " sudo yum install ${array_deps_missing[@]}"
echo -e " sudo yum install ${array_deps_missing[@]}"
fi
if [ "${steamcmdfail}" ]; then
echo ""
echo -e ""
fn_print_failure_nl "Missing dependencies required to run SteamCMD."
fn_script_log_fatal "Missing dependencies required to run SteamCMD."
core_exit.sh
fi
echo ""
echo -e ""
fi
if [ "${function_selfname}" == "command_install.sh" ]; then
sleep 5
@ -562,16 +562,16 @@ fn_deps_build_redhat(){
if [ "${function_selfname}" == "command_install.sh" ]; then
if [ "$(whoami)" == "root" ]; then
echo ""
echo "Checking Dependencies as root"
echo "================================="
echo -e ""
echo -e "${lightyellow}Checking Dependencies as root${default}"
echo -e "================================="
fn_print_information_nl "Checking any missing dependencies for ${gamename} server only."
fn_print_information_nl "This will NOT install a ${gamename} server."
fn_sleep_time
else
echo ""
echo "Checking Dependencies"
echo "================================="
echo -e ""
echo -e "${lightyellow}Checking Dependencies${default}"
echo -e "================================="
fi
fi

View File

@ -10,7 +10,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if executable exists
if [ ! -f "${executabledir}/${execname}" ]; then
fn_print_fail_nl "executable was not found"
echo "* ${executabledir}/${execname}"
echo -e "* ${executabledir}/${execname}"
if [ -d "${lgsmlogdir}" ]; then
fn_script_log_fatal "Executable was not found: ${executabledir}/${execname}"
fi

View File

@ -41,7 +41,7 @@ fn_check_ownership(){
fi
} | column -s $'\t' -t | tee -a "${lgsmlog}"
echo ""
echo -e ""
fn_print_information_nl "please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found"
fn_script_log "For more information, please see https://docs.linuxgsm.com/support/faq#fail-starting-game-server-permission-issues-found"
if [ "${monitorflag}" == 1 ]; then
@ -164,12 +164,12 @@ fn_sys_perm_errors_detect(){
# Display a message on how to fix the issue manually.
fn_sys_perm_fix_manually_msg(){
echo ""
echo -e ""
fn_print_information_nl "This error causes servers to fail starting properly"
fn_script_log_info "This error causes servers to fail starting properly."
echo " * To fix this issue, run the following command as root:"
echo -e " * To fix this issue, run the following command as root:"
fn_script_log_info "To fix this issue, run the following command as root:"
echo " chmod a+rx /sys /sys/class /sys/class/net"
echo -e " chmod a+rx /sys /sys/class /sys/class/net"
fn_script_log "chmod a+rx /sys /sys/class /sys/class/net"
fn_sleep_time
if [ "${monitorflag}" == 1 ]; then

View File

@ -23,7 +23,7 @@ fn_check_steamcmd_user(){
else
fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}"
fi
echo " * Change steamuser=\"username\" to a valid steam login."
echo -e " * Change steamuser=\"username\" to a valid steam login."
if [ -d "${lgsmlogdir}" ]; then
if [ "${legacymode}" == "1" ]; then
fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}"

View File

@ -12,8 +12,8 @@ fn_check_is_in_tmux(){
fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a tmux session."
fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a tmux session."
fn_print_information_nl "LinuxGSM creates a tmux session when starting the server."
echo "It is not possible to run a tmux session inside another tmux session"
echo "https://docs.linuxgsm.com/requirements/tmux#tmuxception"
echo -e "It is not possible to run a tmux session inside another tmux session"
echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception"
core_exit.sh
fi
}
@ -23,8 +23,8 @@ fn_check_is_in_screen(){
fn_print_fail_nl "tmuxception error: Sorry Cobb you cannot start a tmux session inside of a screen session."
fn_script_log_fatal "Tmuxception error: Attempted to start a tmux session inside of a screen session."
fn_print_information_nl "LinuxGSM creates a tmux session when starting the server."
echo "It is not possible to run a tmux session inside screen session"
echo "https://docs.linuxgsm.com/requirements/tmux#tmuxception"
echo -e "It is not possible to run a tmux session inside screen session"
echo -e "https://docs.linuxgsm.com/requirements/tmux#tmuxception"
core_exit.sh
fi
}

View File

@ -13,7 +13,7 @@ check.sh
# Trap to remove lockfile on quit.
fn_backup_trap(){
echo ""
echo -e ""
echo -en "backup ${backupname}.tar.gz..."
fn_print_canceled_eol_nl
fn_script_log_info "Backup ${backupname}.tar.gz: CANCELED"
@ -54,7 +54,7 @@ fn_backup_init(){
else
daysago="${lastbackupdaysago} days ago"
fi
echo " * Previous backup was created ${daysago}, total size ${lastbackupsize}"
echo -e " * Previous backup was created ${daysago}, total size ${lastbackupsize}"
fi
}
@ -68,7 +68,7 @@ fn_backup_stop_server(){
elif [ "${stoponbackup}" == "off" ]; then
serverstopped="no"
fn_print_warn_nl "${servicename} is currently running"
echo " * Although unlikely; creating a backup while ${servicename} is running might corrupt the backup."
echo -e " * Although unlikely; creating a backup while ${servicename} is running might corrupt the backup."
fn_script_log_warn "${servicename} is currently running"
fn_script_log_warn "Although unlikely; creating a backup while ${servicename} is running might corrupt the backup"
# Server is running and will be stopped if stoponbackup=on or unset.
@ -144,7 +144,7 @@ fn_backup_compression(){
if [ ${exitcode} -ne 0 ]; then
fn_print_fail_eol
fn_script_log_fatal "Backup in progress: FAIL"
echo "${tarcmd}" | tee -a "${lgsmlog}"
echo -e "${tarcmd}" | tee -a "${lgsmlog}"
fn_print_fail_nl "Starting backup"
fn_script_log_fatal "Starting backup"
else
@ -174,7 +174,7 @@ fn_backup_prune(){
# If maxbackups greater or equal to backupsoutdatedcount, then it is over maxbackupdays.
if [ "${backupquotadiff}" -ge "${backupsoudatedcount}" ]; then
# Display how many backups will be cleared.
echo " * Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit"
echo -e " * Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit"
fn_script_log_info "Pruning: ${backupquotadiff} backup(s) has exceeded the ${maxbackups} backups limit"
fn_sleep_time
fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)"
@ -186,7 +186,7 @@ fn_backup_prune(){
# If maxbackupdays is used over maxbackups.
elif [ "${backupquotadiff}" -lt "${backupsoudatedcount}" ]; then
# Display how many backups will be cleared.
echo " * Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days."
echo -e " * Pruning: ${backupsoudatedcount} backup(s) are older than ${maxbackupdays} days."
fn_script_log_info "Pruning: ${backupsoudatedcount} backup(s) older than ${maxbackupdays} days."
fn_sleep_time
fn_print_dots "Pruning: Clearing ${backupquotadiff} backup(s)."
@ -243,7 +243,7 @@ fn_backup_relpath() {
# traverse down, just add a newline. Otherwise at this point, there is
# one remaining directory component in the backupdir to navigate.
if (( "$base" < "${#bdirtoks[@]}" )) ; then
echo "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}"
echo -e "${bdirtoks[ $(( ${#bdirtoks[@]} - 1)) ]}"
else
echo
fi

View File

@ -16,8 +16,8 @@ if [ "${shortname}" == "rust" ]||[ "${shortname}" == "hw" ]||[ "${shortname}" ==
fi
fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console."
fn_print_warning_nl "Do NOT press CTRL+c to exit."
echo " * https://docs.linuxgsm.com/commands/console"
echo ""
echo -e " * https://docs.linuxgsm.com/commands/console"
echo -e ""
if ! fn_prompt_yn "Continue?" Y; then
echo Exiting; return
fi

View File

@ -26,65 +26,65 @@ info_config.sh
# NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh.
fn_parms
fn_print_header
echo -e "${blue}Distro:\t${default}${distroname}"
echo -e "${blue}Arch:\t${default}${arch}"
echo -e "${blue}Kernel:\t${default}${kernel}"
echo -e "${blue}Hostname:\t${default}${HOSTNAME}"
echo -e "${blue}tmux:\t${default}${tmuxv}"
echo -e "${blue}Avg Load:\t${default}${load}"
echo -e "${blue}Free Memory:\t${default}${physmemfree}"
echo -e "${blue}Free Disk:\t${default}${availspace}"
{
echo -e "${lightblue}Distro:\t\t${default}${distroname}"
echo -e "${lightblue}Arch:\t\t${default}${arch}"
echo -e "${lightblue}Kernel:\t\t${default}${kernel}"
echo -e "${lightblue}Hostname:\t\t${default}${HOSTNAME}"
echo -e "${lightblue}tmux:\t\t${default}${tmuxv}"
echo -e "${lightblue}Avg Load:\t\t${default}${load}"
echo -e "${lightblue}Free Memory:\t\t${default}${physmemfree}"
echo -e "${lightblue}Free Disk:\t\t${default}${availspace}"
} | column -s $'\t' -t
# glibc required.
if [ -n "${glibc}" ]; then
if [ "${glibc}" == "null" ]; then
# Glibc is not required.
:
elif [ -z "${glibc}" ]; then
echo -e "${blue}glibc required:\t${red}UNKNOWN${default}"
echo -e "${lightblue}glibc required:\t${red}UNKNOWN${default}"
elif [ "$(printf '%s\n'${glibc}'\n' ${glibcversion} | sort -V | head -n 1)" != "${glibc}" ]; then
echo -e "${blue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})"
echo -e "${lightblue}glibc required:\t${red}${glibc} ${default}(${red}distro glibc ${glibcversion} too old${default})"
else
echo -e "${blue}glibc required:\t${green}${glibc}${default}"
echo -e "${lightblue}glibc required:\t${green}${glibc}${default}"
fi
fi
# Server IP
if [ "${multiple_ip}" == "1" ]; then
echo -e "${blue}Server IP:\t${default}NOT SET"
echo -e "${lightblue}Server IP:\t${default}NOT SET"
else
echo -e "${blue}Server IP:\t${default}${ip}:${port}"
echo -e "${lightblue}Server IP:\t${default}${ip}:${port}"
fi
# External server IP.
if [ -n "${extip}" ]; then
if [ "${ip}" != "${extip}" ]; then
echo -e "${blue}Internet IP:\t${default}${extip}:${port}"
echo -e "${lightblue}Internet IP:\t${default}${extip}:${port}"
fi
fi
# Listed on Master Server.
if [ "${displaymasterserver}" ];then
if [ "${displaymasterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${displaymasterserver}${default}"
echo -e "${lightblue}Master Server:\t${green}${displaymasterserver}${default}"
else
echo -e "${blue}Master Server:\t${red}${displaymasterserver}${default}"
echo -e "${lightblue}Master Server:\t${red}${displaymasterserver}${default}"
fi
fi
# Server password.
if [ -n "${serverpassword}" ]; then
echo -e "${blue}Server password:\t${default}${serverpassword}"
echo -e "${lightblue}Server password:\t${default}${serverpassword}"
fi
echo ""
echo "Start parameters:"
echo -e "${lightblue}Start parameters:${default}"
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
echo "${executable} ${parms} -debug"
echo -e "${executable} ${parms} -debug"
else
echo "${executable} ${parms}"
echo -e "${executable} ${parms}"
fi
echo ""
echo -e ""
echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode."
fn_print_warning_nl "If ${servicename} is already running it will be stopped."
echo ""
echo -e ""
if ! fn_prompt_yn "Continue?" Y; then
echo Exiting; return
fi

View File

@ -4,10 +4,10 @@
# Website: https://linuxgsm.com
# Description: Deletes the contents of the functions dir.
echo "================================="
echo "Clear Functions"
echo "================================="
echo ""
echo -e "================================="
echo -e "Clear Functions"
echo -e "================================="
echo -e ""
if fn_prompt_yn "Do you want to delete all functions?" Y; then
rm -rfv "${functionsdir:?}/"*
rm -rfv "${configdirdefault:?}/"*

View File

@ -8,17 +8,17 @@ local commandname="DETECT-DEPS"
local commandaction="Detect-Deps"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "================================="
echo "Dependencies Checker"
echo "================================="
echo "Checking directory: "
echo "${serverfiles}"
echo -e "================================="
echo -e "Dependencies Checker"
echo -e "================================="
echo -e "Checking directory: "
echo -e "${serverfiles}"
if [ "$(command -v eu-readelf 2>/dev/null)" ]; then
readelf=eu-readelf
elif [ "$(command -v readelf 2>/dev/null)" ]; then
readelf=readelf
else
echo "readelf/eu-readelf not installed"
echo -e "readelf/eu-readelf not installed"
fi
files=$(find "${serverfiles}" | wc -l)
find "${serverfiles}" -type f -print0 |
@ -35,14 +35,14 @@ done
sort "${tmpdir}/.depdetect_readelf" |uniq >"${tmpdir}/.depdetect_readelf_uniq"
while read -r lib; do
echo "${lib}"
echo -e "${lib}"
local libs_array=( libm.so.6 libc.so.6 libtcmalloc_minimal.so.4 libpthread.so.0 libdl.so.2 libnsl.so.1 libgcc_s.so.1 librt.so.1 ld-linux.so.2 libdbus-glib-1.so.2 libgio-2.0.so.0 libglib-2.0.so.0 libGL.so.1 libgobject-2.0.so.0 libnm-glib.so.4 libnm-util.so.2 )
for lib_file in "${libs_array[@]}"
do
if [ "${lib}" == "${lib_file}" ]; then
echo "glibc.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list"
echo -e "glibc.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "lib32gcc1" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
fi
done
@ -51,9 +51,9 @@ while read -r lib; do
for lib_file in "${libs_array[@]}"
do
if [ "${lib}" == "${lib_file}" ]; then
echo "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list"
echo "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "default-jre" >> "${tmpdir}/.depdetect_debian_list"
echo -e "java-1.8.0-openjdk" >> "${tmpdir}/.depdetect_centos_list"
echo -e "default-jre" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "default-jre" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
fi
done
@ -68,71 +68,71 @@ while read -r lib; do
done
if [ "${lib}" == "libstdc++.so.6" ]; then
echo "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list"
echo -e "libstdc++.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libstdc++6:i386" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libstdc++.so.5" ]; then
echo "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list"
echo -e "compat-libstdc++-33.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libstdc++5:i386" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libcurl-gnutls.so.4" ]; then
echo "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list"
echo -e "libcurl.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libcurl4-gnutls-dev:i386" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libspeex.so.1" ]||[ "${lib}" == "libspeexdsp.so.1" ]; then
echo "speex.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "speex:i386" >> "${tmpdir}/.depdetect_debian_list"
echo -e "speex.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "speex:i386" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "speex:i386" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "./libSDL-1.2.so.0" ]||[ "${lib}" == "libSDL-1.2.so.0" ]; then
echo "SDL.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list"
echo -e "SDL.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libsdl1.2debian" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libtbb.so.2" ]; then
echo "tbb.i686" >> "${tmpdir}/.depdetect_centos_list"
echo "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libtbb2" >> "${tmpdir}/.depdetect_debian_list"
echo -e "tbb.i686" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libtbb2" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libtbb2" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libXrandr.so.2" ]; then
echo "libXrandr" >> "${tmpdir}/.depdetect_centos_list"
echo "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libxrandr2" >> "${tmpdir}/.depdetect_debian_list"
echo -e "libXrandr" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libxrandr2" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libxrandr2" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libXext.so.6" ]; then
echo "libXext" >> "${tmpdir}/.depdetect_centos_list"
echo "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libxext6" >> "${tmpdir}/.depdetect_debian_list"
echo -e "libXext" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libxext6" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libxext6" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libXtst.so.6" ]; then
echo "libXtst" >> "${tmpdir}/.depdetect_centos_list"
echo "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libxtst6" >> "${tmpdir}/.depdetect_debian_list"
echo -e "libXtst" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libxtst6" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libxtst6" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libpulse.so.0" ]; then
echo "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list"
echo "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libpulse0" >> "${tmpdir}/.depdetect_debian_list"
echo -e "pulseaudio-libs" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libpulse0" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libpulse0" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libopenal.so.1" ]; then
echo "" >> "${tmpdir}/.depdetect_centos_list"
echo "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libopenal1" >> "${tmpdir}/.depdetect_debian_list"
echo -e "" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libopenal1" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libopenal1" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
elif [ "${lib}" == "libgconf-2.so.4" ]; then
echo "GConf2" >> "${tmpdir}/.depdetect_centos_list"
echo "libgconf2-4" >> "${tmpdir}/.depdetect_ubuntu_list"
echo "libgconf2-4" >> "${tmpdir}/.depdetect_debian_list"
echo -e "GConf2" >> "${tmpdir}/.depdetect_centos_list"
echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_ubuntu_list"
echo -e "libgconf2-4" >> "${tmpdir}/.depdetect_debian_list"
libdetected=1
fi
if [ "${libdetected}" != "1" ]; then
unknownlib=1
echo "${lib}" >> "${tmpdir}/.depdetect_unknown"
echo -e "${lib}" >> "${tmpdir}/.depdetect_unknown"
fi
unset libdetected
done < "${tmpdir}/.depdetect_readelf_uniq"
@ -147,35 +147,35 @@ fi
awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_centos_list_uniq" > "${tmpdir}/.depdetect_centos_line"
awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_ubuntu_list_uniq" > "${tmpdir}/.depdetect_ubuntu_line"
awk -vORS='' '{ print $1,$2 }' "${tmpdir}/.depdetect_debian_list_uniq" > "${tmpdir}/.depdetect_debian_line"
echo ""
echo ""
echo "Required Dependencies"
echo "================================="
echo "${executable}"
echo ""
echo "CentOS"
echo "================================="
echo -e ""
echo -e ""
echo -e "Required Dependencies"
echo -e "================================="
echo -e "${executable}"
echo -e ""
echo -e "CentOS"
echo -e "================================="
cat "${tmpdir}/.depdetect_centos_line"
echo ""
echo ""
echo "Ubuntu"
echo "================================="
echo -e ""
echo -e ""
echo -e "Ubuntu"
echo -e "================================="
cat "${tmpdir}/.depdetect_ubuntu_line"
echo ""
echo ""
echo "Debian"
echo "================================="
echo -e ""
echo -e ""
echo -e "Debian"
echo -e "================================="
cat "${tmpdir}/.depdetect_debian_line"
echo ""
echo -e ""
if [ "${unknownlib}" == "1" ]; then
echo ""
echo "Unknown shared Library"
echo "================================="
echo -e ""
echo -e "Unknown shared Library"
echo -e "================================="
cat "${tmpdir}/.depdetect_unknown"
fi
echo ""
echo "Required Librarys"
echo "================================="
echo -e ""
echo -e "Required Librarys"
echo -e "================================="
sort "${tmpdir}/.depdetect_readelf" | uniq
echo -en "\n"
rm -f "${tmpdir}/.depdetect_centos_line"

View File

@ -9,9 +9,9 @@ local commandname="DETECT-GLIBC"
local commandaction="Detect-Glibc"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "================================="
echo "glibc Requirements Checker"
echo "================================="
echo -e "================================="
echo -e "glibc Requirements Checker"
echo -e "================================="
if [ -z "$(command -v objdump)" ]; then
fn_print_failure_nl "objdump is missing"
@ -24,13 +24,13 @@ if [ -z "${serverfiles}" ]; then
fi
if [ -d "${serverfiles}" ]; then
echo "Checking directory: "
echo "${serverfiles}"
echo -e "Checking directory: "
echo -e "${serverfiles}"
elif [ -f "${serverfiles}" ]; then
echo "Checking file: "
echo "${serverfiles}"
echo -e "Checking file: "
echo -e "${serverfiles}"
fi
echo ""
echo -e ""
local glibc_check_dir_array=( steamcmddir serverfiles )
@ -50,25 +50,25 @@ do
while IFS= read -r -d $'\0' line; do
glibcversion=$(objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1)
if [ "${glibcversion}" ]; then
echo "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
echo -e "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
fi
objdump -T "${line}" 2>/dev/null | grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc_${glibc_check_var}.tmp"
echo -n "${i} / ${glibc_check_files}" $'\r'
((i++))
done
echo ""
echo ""
echo "${glibc_check_name} glibc Requirements"
echo "================================="
echo -e ""
echo -e ""
echo -e "${glibc_check_name} glibc Requirements"
echo -e "================================="
if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then
echo "Required glibc"
echo -e "Required glibc"
cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort | head -1 |tee -a "${tmpdir}/detect_glibc_highest.tmp"
echo ""
echo "Files requiring GLIBC"
echo "Highest verion required: filename"
echo -e ""
echo -e "Files requiring GLIBC"
echo -e "Highest verion required: filename"
cat "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
echo ""
echo "All required GLIBC versions"
echo -e ""
echo -e "All required GLIBC versions"
cat "${tmpdir}/detect_glibc_${glibc_check_var}.tmp" | sort | uniq | sort -r --version-sort
rm "${tmpdir}/detect_glibc_${glibc_check_var}.tmp"
rm "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
@ -79,9 +79,9 @@ do
fn_print_information_nl "${glibc_check_name} is not installed"
fi
done
echo ""
echo "Final glibc Requirement"
echo "================================="
echo -e ""
echo -e "Final glibc Requirement"
echo -e "================================="
if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then
cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1
rm "${tmpdir}/detect_glibc_highest.tmp"

View File

@ -9,48 +9,48 @@ local commandname="DETECT-LDD"
local commandaction="Detect-LDD"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "================================="
echo "Shared Object dependencies Checker"
echo "================================="
echo -e "================================="
echo -e "Shared Object dependencies Checker"
echo -e "================================="
if [ -z "${serverfiles}" ]; then
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
fi
if [ -d "${serverfiles}" ]; then
echo "Checking directory: "
echo "${serverfiles}"
echo -e "Checking directory: "
echo -e "${serverfiles}"
elif [ -f "${serverfiles}" ]; then
echo "Checking file: "
echo "${serverfiles}"
echo -e "Checking file: "
echo -e "${serverfiles}"
fi
echo ""
echo -e ""
files=$(find "${serverfiles}" | wc -l)
find "${serverfiles}" -type f -print0 |
while IFS= read -r -d $'\0' line; do
if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable"
then
echo "${line}" >> "${tmpdir}/detect_ldd.tmp"
echo -e "${line}" >> "${tmpdir}/detect_ldd.tmp"
ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" >> "${tmpdir}/detect_ldd.tmp"
if ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found"
then
echo "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp"
echo -e "${line}" >> "${tmpdir}/detect_ldd_not_found.tmp"
ldd "${line}" 2>/dev/null | grep -v "not a dynamic executable" | grep "not found" >> "${tmpdir}/detect_ldd_not_found.tmp"
fi
fi
echo -n "$i / $files" $'\r'
((i++))
done
echo ""
echo ""
echo "All"
echo "================================="
echo -e ""
echo -e ""
echo -e "All"
echo -e "================================="
cat "${tmpdir}/detect_ldd.tmp"
echo ""
echo "Not Found"
echo "================================="
echo -e ""
echo -e "Not Found"
echo -e "================================="
cat "${tmpdir}/detect_ldd_not_found.tmp"
rm "${tmpdir}/detect_ldd.tmp"

View File

@ -7,12 +7,12 @@
local commandname="QUERY-RAW"
local commandaction="Query Raw"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Query Port"
echo "=================================================================="
echo ""
echo "Gamedig Raw Output"
echo "================================="
echo -e ""
echo -e "Query Port"
echo -e "=================================================================="
echo -e ""
echo -e "Gamedig Raw Output"
echo -e "================================="
echo""
if [ ! "$(command -v gamedig 2>/dev/null)" ]; then
fn_print_failure_nl "gamedig not installed"
@ -31,70 +31,70 @@ elif [ "${shortname}" == "kf2" ]; then
fi
query_gamedig.sh
echo "${gamedigcmd}"
echo -e "${gamedigcmd}"
echo""
echo "${gamedigraw}" | jq
echo -e "${gamedigraw}" | jq
echo""
echo "gsquery Raw Output"
echo "================================="
echo -e "gsquery Raw Output"
echo -e "================================="
echo""
echo "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${engine}\""
echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${engine}\""
if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
fi
"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}"
echo""
echo "TCP Raw Output"
echo "================================="
echo -e "TCP Raw Output"
echo -e "================================="
echo""
echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''"
echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''"
bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''
querystatus="$?"
if [ "${querystatus}" == "0" ]; then
echo "TCP query PASS"
echo -e "TCP query PASS"
else
echo "TCP query FAIL"
echo -e "TCP query FAIL"
fi
echo""
echo "UDP Raw Output"
echo "================================="
echo -e "UDP Raw Output"
echo -e "================================="
echo""
echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''"
echo -e "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''"
bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''
querystatus="$?"
if [ "${querystatus}" == "0" ]; then
echo "UPD query PASS"
echo -e "UPD query PASS"
else
echo "UPD query FAIL"
echo -e "UPD query FAIL"
fi
echo ""
echo "Game Port"
echo "=================================================================="
echo ""
echo -e ""
echo -e "Game Port"
echo -e "=================================================================="
echo -e ""
echo""
echo "TCP Raw Output"
echo "================================="
echo -e "TCP Raw Output"
echo -e "================================="
echo""
echo "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''"
echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''"
bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''
querystatus="$?"
if [ "${querystatus}" == "0" ]; then
echo "TCP query PASS"
echo -e "TCP query PASS"
else
echo "TCP query FAIL"
echo -e "TCP query FAIL"
fi
echo""
echo "UDP Raw Output"
echo "================================="
echo -e "UDP Raw Output"
echo -e "================================="
echo""
echo "bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''"
echo -e "bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''"
bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''
querystatus="$?"
if [ "${querystatus}" == "0" ]; then
echo "UDP query PASS"
echo -e "UDP query PASS"
else
echo "UDP query FAIL"
echo -e "UDP query FAIL"
fi

View File

@ -3,16 +3,15 @@
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Shows ways to donate
echo -e ""
fn_print_ascii_logo
echo -e "${lightyellow}Support LinuxGSM${default}"
echo -e "================================="
echo -e ""
echo -e "Been using LinuxGSM?"
echo -e "Consider donating to support development."
echo -e ""
echo -e "* ${blue}Patreon:${default} https://linuxgsm.com/patreon"
echo -e "* ${blue}PayPal:${default} https://linuxgsm.com/paypal"
echo -e "* ${blue}Flattr:${default} https://linuxgsm.com/flattr"
echo -e "* ${lightblue}Patreon:${default} https://linuxgsm.com/patreon"
echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal"
echo -e "* ${lightblue}Ko-Fi:${default} https://linuxgsm.com/ko-fi"
echo -e ""
echo -e "LinuxGSM has been going since 2012"
echo -e "LinuxGSM est. 2012"

View File

@ -31,18 +31,18 @@ fi
# Header
fn_print_header
echo "More info: https://docs.linuxgsm.com/commands/fastdl"
echo ""
echo -e "More info: https://docs.linuxgsm.com/commands/fastdl"
echo -e ""
# Prompts user for FastDL creation settings.
echo "${commandaction} setup"
echo "================================="
echo -e "${commandaction} setup"
echo -e "================================="
# Prompt for clearing old files if directory was already here.
if [ -d "${fastdldir}" ]; then
fn_print_warning_nl "FastDL directory already exists."
echo "${fastdldir}"
echo ""
echo -e "${fastdldir}"
echo -e ""
if fn_prompt_yn "Overwrite existing directory?" Y; then
fn_script_log_info "Overwrite existing directory: YES"
else
@ -129,7 +129,7 @@ fn_human_readable_file_size(){
local precision="${2}"
if [[ "${bytes}" == "1" ]]; then
echo "1 byte"
echo -e "1 byte"
else
for item in "${abbrevs[@]}"; do
local factor="${item%:*}"
@ -162,7 +162,7 @@ fn_fastdl_preview(){
((fileswc++))
tput rc; tput el
printf "gathering ${allowed_extention} : ${fileswc}..."
echo "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt"
echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt"
done < <(find . -type f -iname ${allowed_extention})
if [ ${fileswc} != 0 ]; then
fn_print_ok_eol_nl
@ -193,10 +193,10 @@ fn_fastdl_preview(){
((fileswc++))
tput rc; tput el
printf "gathering ${directory} ${allowed_extention} : ${fileswc}..."
echo "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt"
echo -e "${ext}" >> "${tmpdir}/fastdl_files_to_compress.txt"
done < <(find "${systemdir}/${directory}" -type f -iname ${allowed_extention})
tput rc; tput el
echo "gathering ${directory} ${allowed_extention} : ${fileswc}..."
echo -e "gathering ${directory} ${allowed_extention} : ${fileswc}..."
if [ ${fileswc} != 0 ]; then
fn_print_ok_eol_nl
else
@ -207,7 +207,7 @@ fn_fastdl_preview(){
done
fi
if [ -f "${tmpdir}/fastdl_files_to_compress.txt" ]; then
echo "calculating total file size..."
echo -e "calculating total file size..."
fn_sleep_time
totalfiles=$(wc -l < "${tmpdir}/fastdl_files_to_compress.txt")
# Calculates total file size.
@ -226,7 +226,7 @@ fn_fastdl_preview(){
fn_script_log_fatal "Generating file list."
core_exit.sh
fi
echo "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)"
echo -e "about to compress ${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)"
fn_script_log_info "${totalfiles} files, total size $(fn_human_readable_file_size ${filesizetotal} 0)"
rm "${tmpdir}/fastdl_files_to_compress.txt"
if ! fn_prompt_yn "Continue?" Y; then
@ -245,7 +245,7 @@ fn_fastdl_gmod(){
while read -r fastdlfile; do
((fileswc++))
tput rc; tput el
echo "copying ${allowed_extention} : ${fileswc}..."
echo -e "copying ${allowed_extention} : ${fileswc}..."
cp --parents "${fastdlfile}" "${fastdldir}"
exitcode=$?
if [ ${exitcode} -ne 0 ]; then
@ -396,7 +396,7 @@ fn_fastdl_gmod_dl_enforcer(){
touch "${luafastdlfullpath}"
# Read all filenames and put them into a lua file at the right path.
while read -r line; do
echo "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}"
echo -e "resource.AddFile( \"${line}\" )" >> "${luafastdlfullpath}"
done < <(find "${fastdldir:?}" \( -type f ! -name "*.bz2" \) -printf '%P\n')
exitcode=$?
if [ ${exitcode} -ne 0 ]; then
@ -434,8 +434,8 @@ fn_fastdl_dirs
fn_fastdl_build
fn_fastdl_bzip2
# Finished message.
echo "FastDL files are located in:"
echo "${fastdldir}"
echo "FastDL completed"
echo -e "FastDL files are located in:"
echo -e "${fastdldir}"
echo -e "FastDL completed"
fn_script_log_info "FastDL completed"
core_exit.sh

View File

@ -9,12 +9,12 @@ local commandaction="Default Resources"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_resources(){
echo ""
echo "Installing Default Resources"
echo "================================="
echo -e ""
echo -e "Installing Default Resources"
echo -e "================================="
fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5"
fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}"
echo "Default Resources Installed."
echo -e "Default Resources Installed."
}
fn_print_header

View File

@ -17,8 +17,8 @@ fn_print_header
# Displays a list of installed mods.
fn_mods_installed_list
if [ "${installedmodscount}" -gt "0" ]; then
echo "Installed addons/mods"
echo "================================="
echo -e "Installed addons/mods"
echo -e "================================="
# Go through all available commands, get details and display them to the user.
for ((llindex=0; llindex < ${#installedmodslist[@]}; llindex++)); do
# Current mod is the "llindex" value of the array we're going through.
@ -27,11 +27,11 @@ if [ "${installedmodscount}" -gt "0" ]; then
# Display mod info to the user.
echo -e " * ${green}${modcommand}${default}${default}"
done
echo ""
echo -e ""
fi
echo "Available addons/mods"
echo "================================="
echo -e "Available addons/mods"
echo -e "================================="
# Display available mods from mods_list.sh.
# Set and reset vars
compatiblemodslistindex=0
@ -59,7 +59,7 @@ fi
fn_script_log_info "${totalmodsavailable} addons/mods are available for install"
## User selects a mod.
echo ""
echo -e ""
while [[ ! " ${availablemodscommands[@]} " =~ " ${usermodselect} " ]]; do
echo -en "Enter an ${cyan}addon/mod${default} to ${green}install${default} (or exit to abort): "
read -r usermodselect
@ -75,9 +75,9 @@ done
currentmod="${usermodselect}"
fn_mod_get_info
echo ""
echo "Installing ${modprettyname}"
echo "================================="
echo -e ""
echo -e "Installing ${modprettyname}"
echo -e "================================="
fn_script_log_info "${modprettyname} selected for install"
# Check if the mod is already installed and warn the user.
@ -85,7 +85,7 @@ if [ -f "${modsinstalledlistfullpath}" ]; then
if [ -n "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then
fn_print_warning_nl "${modprettyname} is already installed"
fn_script_log_warn "${modprettyname} is already installed"
echo " * Any configs may be overwritten."
echo -e " * Any configs may be overwritten."
if ! fn_prompt_yn "Continue?" Y; then
echo Exiting; core_exit.sh
fi
@ -105,7 +105,7 @@ fn_mod_copy_destination
fn_mod_add_list
fn_mod_tidy_files_list
fn_mods_clear_tmp_dir
echo "${modprettyname} installed"
echo -e "${modprettyname} installed"
fn_script_log_pass "${modprettyname} installed."
core_exit.sh

View File

@ -14,8 +14,8 @@ mods_core.sh
fn_mods_check_installed
fn_print_header
echo "Remove addons/mods"
echo "================================="
echo -e "Remove addons/mods"
echo -e "================================="
# Displays list of installed mods.
# Generates list to display to user.
@ -29,7 +29,7 @@ for ((mlindex=0; mlindex < ${#installedmodslist[@]}; mlindex++)); do
echo -e "${red}${modcommand}${default} - ${modprettyname} - ${moddescription}"
done
echo ""
echo -e ""
# Keep prompting as long as the user input doesn't correspond to an available mod.
while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do
echo -en "Enter an ${cyan}addon/mod${default} to ${red}remove${default} (or exit to abort): "
@ -44,7 +44,7 @@ while [[ ! " ${installedmodslist[@]} " =~ " ${usermodselect} " ]]; do
done
fn_print_warning_nl "You are about to remove ${cyan}${usermodselect}${default}."
echo " * Any custom files/configuration will be removed."
echo -e " * Any custom files/configuration will be removed."
if ! fn_prompt_yn "Continue?" Y; then
echo Exiting; exit
fi
@ -78,7 +78,7 @@ while [ "${modfileline}" -le "${modsfilelistsize}" ]; do
fi
fi
tput rc; tput el
echo "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
echo -e "removing ${modprettyname} ${modfileline} / ${modsfilelistsize} : ${currentfileremove}..."
((modfileline++))
done
if [ ${exitcode} -ne 0 ]; then
@ -126,7 +126,7 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then
command_validate.sh
unset exitbypass
fi
echo "${modprettyname} removed"
echo -e "${modprettyname} removed"
fn_script_log "${modprettyname} removed"
core_exit.sh

View File

@ -19,11 +19,11 @@ fn_remove_cfg_files(){
echo -e "the following files/directories will be preserved:"
fn_sleep_time
# Count how many files there are to remove.
filestopreserve="$(echo "${modkeepfiles}" | awk -F ';' '{ print NF }')"
filestopreserve="$(echo -e "${modkeepfiles}" | awk -F ';' '{ print NF }')"
# Test all subvalues of "modkeepfiles" using the ";" separator.
for ((preservefilesindex=1; preservefilesindex < ${filestopreserve}; preservefilesindex++)); do
# Put the current file we are looking for into a variable.
filetopreserve="$(echo "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }' )"
filetopreserve="$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }' )"
echo -e " * serverfiles/${filetopreserve}"
# If it matches an existing file that have been extracted delete the file.
if [ -f "${extractdir}/${filetopreserve}" ]||[ -d "${extractdir}/${filetopreserve}" ]; then
@ -32,7 +32,7 @@ fn_remove_cfg_files(){
if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then
touch "${modsdir}/.removedfiles.tmp"
fi
echo "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp"
echo -e "${filetopreserve}" >> "${modsdir}/.removedfiles.tmp"
fi
done
fi
@ -79,8 +79,8 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do
fn_print_info "${modprettyname} will not be updated to preserve custom files"
fn_script_log_info "${modprettyname} will not be updated to preserve custom files"
else
echo ""
echo "==> Updating ${modprettyname}"
echo -e ""
echo -e "==> Updating ${modprettyname}"
fn_create_mods_dir
fn_mods_clear_tmp_dir
fn_mods_create_tmp_dir
@ -101,7 +101,7 @@ while [ "${installedmodsline}" -le "${installedmodscount}" ]; do
core_exit.sh
fi
done
echo ""
echo -e ""
fn_print_ok_nl "Mods update complete"
fn_script_log_info "Mods update complete"

View File

@ -90,7 +90,7 @@ fn_monitor_check_lockfile(){
if [ ! -f "${rootdir}/${lockselfname}" ]; then
fn_print_error_nl "Disabled: No lockfile found"
fn_script_log_error "Disabled: No lockfile found"
echo " * To enable monitor run ./${selfname} start"
echo -e " * To enable monitor run ./${selfname} start"
core_exit.sh
fi
}

View File

@ -95,7 +95,7 @@ if [ "${posttarget}" == "http://pastebin.com" ] ; then
# Output the resulting link.
fn_print_ok_nl "Posting details to pastbin.com for ${postexpire}"
pdurl="${posttarget}${link}"
echo " Please share the following url for support: ${pdurl}"
echo -e " Please share the following url for support: ${pdurl}"
elif [ "${posttarget}" == "https://hastebin.com" ] ; then
fn_print_dots "Posting details to hastebin.com"
# hastebin is a bit simpler. If successful, the returned result
@ -104,13 +104,14 @@ elif [ "${posttarget}" == "https://hastebin.com" ] ; then
link=$(${curlpath} -H "HTTP_X_REQUESTED_WITH:XMLHttpRequest" -s -d "$(<${postdetailslog})" "${posttarget}/documents" | cut -d\" -f4)
fn_print_ok_nl "Posting details to hastebin.com for ${postexpire}"
pdurl="${posttarget}/${link}"
echo " Please share the following url for support: ${pdurl}"
echo -e "Please share the following url for support: ${pdurl}"
elif [ "${posttarget}" == "https://termbin.com" ] ; then
fn_print_dots "Posting details to termbin.com"
link=$(cat "${postdetailslog}" | nc termbin.com 9999 | tr -d '\n\0')
fn_print_ok_nl "Posting details to termbin.com"
pdurl="${link}"
echo " Please share the following url for support: ${pdurl}"
echo -e "Please share the following url for support: "
echo -e "${pdurl}"
else
fn_print_warn_nl "Review output in: ${postdetailslog}"
core_exit.sh

View File

@ -97,7 +97,7 @@ fn_start_tmux(){
# Tmux compiled from source will return "master", therefore ignore it.
if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p')" == "master" ]; then
fn_script_log "Tmux version: master (user compiled)"
echo "Tmux version: master (user compiled)" >> "${consolelog}"
echo -e "Tmux version: master (user compiled)" >> "${consolelog}"
if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then
tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'"
fi
@ -106,13 +106,13 @@ fn_start_tmux(){
tmuxversion="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')"
# tmux pipe-pane not supported in tmux versions < 1.6.
if [ "${tmuxversion}" -lt "16" ]; then
echo "Console logging disabled: Tmux => 1.6 required
echo -e "Console logging disabled: Tmux => 1.6 required
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging disabled: Bug in tmux 1.8 breaks logging.
elif [ "${tmuxversion}" -eq "18" ]; then
echo "Console logging disabled: Bug in tmux 1.8 breaks logging
echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging
https://linuxgsm.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging enable or not set.
@ -120,13 +120,13 @@ fn_start_tmux(){
tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'"
fi
else
echo "Unable to detect tmux version" >> "${consolelog}"
echo -e "Unable to detect tmux version" >> "${consolelog}"
fn_script_log_warn "Unable to detect tmux version"
fi
# Console logging disabled.
if [ "${consolelogging}" == "off" ]; then
echo "Console logging disabled by user" >> "${consolelog}"
echo -e "Console logging disabled by user" >> "${consolelog}"
fn_script_log_info "Console logging disabled by user"
fi
fn_sleep_time
@ -139,39 +139,39 @@ fn_sleep_time
if [ -s "${lgsmlogdir}/.${servicename}-tmux-error.tmp" ]; then
fn_print_fail_nl "Unable to start ${servername}: Tmux error:"
fn_script_log_fatal "Unable to start ${servername}: Tmux error:"
echo ""
echo "Command"
echo "================================="
echo "tmux new-session -d -s \"${servicename}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}"
echo ""
echo "Error"
echo "================================="
echo -e ""
echo -e "Command"
echo -e "================================="
echo -e "tmux new-session -d -s \"${servicename}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}"
echo -e ""
echo -e "Error"
echo -e "================================="
cat "${lgsmlogdir}/.${servicename}-tmux-error.tmp" | tee -a "${lgsmlog}"
# Detected error https://linuxgsm.com/support
if grep -c "Operation not permitted" "${lgsmlogdir}/.${servicename}-tmux-error.tmp"
then
echo ""
echo "Fix"
echo "================================="
echo -e ""
echo -e "Fix"
echo -e "================================="
if [ ! "$(grep "tty:" /etc/group|grep "$(whoami)")" ]; then
echo "$(whoami) is not part of the tty group."
echo -e "$(whoami) is not part of the tty group."
fn_script_log_info "$(whoami) is not part of the tty group."
group=$(grep tty /etc/group)
echo ""
echo " ${group}"
echo -e ""
echo -e " ${group}"
fn_script_log_info "${group}"
echo ""
echo "Run the following command with root privileges."
echo ""
echo " usermod -G tty $(whoami)"
echo ""
echo "https://linuxgsm.com/tmux-op-perm"
echo -e ""
echo -e "Run the following command with root privileges."
echo -e ""
echo -e " usermod -G tty $(whoami)"
echo -e ""
echo -e "https://linuxgsm.com/tmux-op-perm"
fn_script_log_info "https://linuxgsm.com/tmux-op-perm"
else
echo "No known fix currently. Please log an issue."
echo -e "No known fix currently. Please log an issue."
fn_script_log_info "No known fix currently. Please log an issue."
echo "https://linuxgsm.com/support"
echo -e "https://linuxgsm.com/support"
fn_script_log_info "https://linuxgsm.com/support"
fi
fi

View File

@ -11,10 +11,10 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_serveradmin_password_prompt(){
fn_print_header
echo "Press \"CTRL+b d\" to exit console."
echo -e "Press \"CTRL+b d\" to exit console."
fn_print_information_nl "You are about to change the ${gamename} ServerAdmin password."
fn_print_warning_nl "${gamename} will restart during this process."
echo ""
echo -e ""
if ! fn_prompt_yn "Continue?" Y; then
echo Exiting; exit
fi

View File

@ -10,7 +10,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_validation(){
fn_print_info "Validating files: SteamCMD"
echo ""
echo -e ""
echo -e "* Validating may overwrite some customised files."
echo -e "* https://docs.linuxgsm.com/commands/validate"
fn_script_log_info "Validating files: SteamCMD"

View File

@ -25,7 +25,7 @@ fn_wipe_server_process(){
else
fn_wipe_server_remove_files
fi
echo "server data wiped"
echo -e "server data wiped"
fn_script_log "server data wiped."
}

View File

@ -9,14 +9,14 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
check.sh
fn_print_header
echo "Will compress all maps in:"
echo ""
echo -e "Will compress all maps in:"
echo -e ""
pwd
echo ""
echo "Compressed maps saved to:"
echo ""
echo "${compressedmapsdir}"
echo ""
echo -e ""
echo -e "Compressed maps saved to:"
echo -e ""
echo -e "${compressedmapsdir}"
echo -e ""
if ! fn_prompt_yn "Start compression?" Y; then
echo Exiting; return
fi

View File

@ -9,14 +9,14 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
check.sh
fn_print_header
echo "Will compress all maps in:"
echo ""
echo -e "Will compress all maps in:"
echo -e ""
pwd
echo ""
echo "Compressed maps saved to:"
echo ""
echo "${compressedmapsdir}"
echo ""
echo -e ""
echo -e "Compressed maps saved to:"
echo -e ""
echo -e "${compressedmapsdir}"
echo -e ""
if ! fn_prompt_yn "Start compression?" Y; then
echo Exiting; return
fi

View File

@ -45,8 +45,8 @@ fn_dl_md5(){
local md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}')
if [ "${md5sumcmd}" != "${md5}" ]; then
fn_print_fail_eol_nl
echo "${local_filename} returned MD5 checksum: ${md5sumcmd}"
echo "expected MD5 checksum: ${md5}"
echo -e "${local_filename} returned MD5 checksum: ${md5sumcmd}"
echo -e "expected MD5 checksum: ${md5}"
fn_script_log_fatal "Verifying ${local_filename} with MD5"
fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}"
fn_script_log_info "Expected MD5 checksum: ${md5}"
@ -88,9 +88,9 @@ fn_dl_extract(){
fn_print_fail_eol_nl
fn_script_log_fatal "Extracting download"
if [ -f "${lgsmlog}" ]; then
echo "${extractcmd}" >> "${lgsmlog}"
echo -e "${extractcmd}" >> "${lgsmlog}"
fi
echo "${extractcmd}"
echo -e "${extractcmd}"
core_exit.sh
else
fn_print_ok_eol_nl
@ -100,7 +100,7 @@ fn_dl_extract(){
# Trap to remove file download if canceled before completed.
fn_fetch_trap(){
echo ""
echo -e ""
echo -en "downloading ${local_filename}..."
fn_print_canceled_eol_nl
fn_script_log_info "Downloading ${local_filename}...CANCELED"
@ -145,10 +145,10 @@ fn_fetch_file(){
if [ -f "${lgsmlog}" ]; then
fn_script_log_fatal "Downloading ${local_filename}"
echo -e "${remote_fileurl}" >> "${lgsmlog}"
echo "${curlcmd}" >> "${lgsmlog}"
echo -e "${curlcmd}" >> "${lgsmlog}"
fi
echo -e "${remote_fileurl}"
echo "${curlcmd}"
echo -e "${curlcmd}"
core_exit.sh
else
fn_print_ok_eol_nl
@ -258,6 +258,6 @@ fn_update_function(){
curlpath=$(command -v curl 2>/dev/null)
if [ "$(basename "${curlpath}")" != "curl" ]; then
echo "[ FAIL ] Curl is not installed"
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi

View File

@ -6,8 +6,8 @@
fn_exit_dev_debug(){
if [ -f "${rootdir}/.dev-debug" ]; then
echo ""
echo "${function_selfname} exiting with code: ${exitcode}"
echo -e ""
echo -e "${function_selfname} exiting with code: ${exitcode}"
if [ -f "${rootdir}/dev-debug.log" ]; then
grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log"
fi

View File

@ -145,18 +145,18 @@ currentopt+=( "${cmd_donate[@]}" )
optcommands=()
index="0"
for ((index="0"; index < ${#currentopt[@]}; index+=3)); do
cmdamount="$(echo "${currentopt[index]}" | awk -F ';' '{ print NF }')"
cmdamount="$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }')"
for ((cmdindex=1; cmdindex <= ${cmdamount}; cmdindex++)); do
optcommands+=( "$(echo "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')" )
optcommands+=( "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${cmdindex} '{ print $x }')" )
done
done
# Shows LinuxGSM usage.
fn_opt_usage(){
echo "Usage: $0 [option]"
echo -e "Usage: $0 [option]"
echo -e ""
echo "LinuxGSM - ${gamename} - Version ${version}"
echo "https://linuxgsm.com/${gameservername}"
echo -e "LinuxGSM - ${gamename} - Version ${version}"
echo -e "https://linuxgsm.com/${gameservername}"
echo -e ""
echo -e "${lightyellow}Commands${default}"
# Display available commands.
@ -165,7 +165,7 @@ fn_opt_usage(){
for ((index="0"; index < ${#currentopt[@]}; index+=3)); do
# Hide developer commands.
if [ "${currentopt[index+2]}" != "DEVCOMMAND" ]; then
echo -e "${cyan}$(echo "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index+2]}"
echo -e "${cyan}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $2 }')\t${default}$(echo -e "${currentopt[index]}" | awk -F ';' '{ print $1 }')\t| ${currentopt[index+2]}"
fi
done
} | column -s $'\t' -t
@ -182,9 +182,9 @@ for i in "${optcommands[@]}"; do
# Seek and run command.
index="0"
for ((index="0"; index < ${#currentopt[@]}; index+=3)); do
currcmdamount="$(echo "${currentopt[index]}" | awk -F ';' '{ print NF }')"
currcmdamount="$(echo -e "${currentopt[index]}" | awk -F ';' '{ print NF }')"
for ((currcmdindex=1; currcmdindex <= ${currcmdamount}; currcmdindex++)); do
if [ "$(echo "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then
if [ "$(echo -e "${currentopt[index]}" | awk -F ';' -v x=${currcmdindex} '{ print $x }')" == "${getopt}" ]; then
# Run command.
eval "${currentopt[index+1]}"
core_exit.sh

View File

@ -11,6 +11,7 @@ fn_ansi_loader(){
if [ "${ansi}" != "off" ]; then
# echo colors
default="\e[0m"
black="\e[30m"
red="\e[31m"
lightred="\e[91m"
green="\e[32m"
@ -23,6 +24,9 @@ fn_ansi_loader(){
lightmagenta="\e[95m"
cyan="\e[36m"
lightcyan="\e[96m"
darkgrey="\e[90m"
lightgrey="\e[37m"
white="\e[97m"
fi
# carriage return & erase to end of line.
creeol="\r\033[K"
@ -195,18 +199,18 @@ fn_print_error_nl(){
# [ WARN ]
fn_print_warn(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${yellow} WARN ${default}] ${commandaction} ${servicename}: $@"
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $@"
else
echo -en "${creeol}[${yellow} WARN ${default}] $@"
echo -en "${creeol}[${lightyellow} WARN ${default}] $@"
fi
fn_sleep_time
}
fn_print_warn_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${yellow} WARN ${default}] ${commandaction} ${servicename}: $@"
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $@"
else
echo -en "${creeol}[${yellow} WARN ${default}] $@"
echo -en "${creeol}[${lightyellow} WARN ${default}] $@"
fi
fn_sleep_time
echo -en "\n"
@ -239,9 +243,8 @@ fn_print_info_nl(){
# =================================
fn_print_header(){
echo -e ""
echo -e "${gamename} ${commandaction}"
echo -e "${lightyellow}${gamename} ${commandaction}${default}"
echo -e "=================================${default}"
echo -e ""
}
# Complete!
@ -279,12 +282,12 @@ fn_print_error2_nl(){
# Warning!
fn_print_warning(){
echo -en "${yellow}Warning!${default} $@"
echo -en "${lightyellow}Warning!${default} $@"
fn_sleep_time
}
fn_print_warning_nl(){
echo -e "${yellow}Warning!${default} $@"
echo -e "${lightyellow}Warning!${default} $@"
fn_sleep_time
}
@ -317,7 +320,7 @@ fn_prompt_yn(){
case "${yn}" in
[Yy]|[Yy][Ee][Ss]) return 0 ;;
[Nn]|[Nn][Oo]) return 1 ;;
*) echo "Please answer yes or no." ;;
*) echo -e "Please answer yes or no." ;;
esac
done
}
@ -350,11 +353,11 @@ fn_print_error_eol(){
# WARN
fn_print_warn_eol(){
echo -en "${red}WARN${default}"
echo -en "${lightyellow}WARN${default}"
}
fn_print_warn_eol_nl(){
echo -e "${red}WARN${default}"
echo -e "${lightyellow}WARN${default}"
}
# INFO
@ -419,3 +422,39 @@ fn_print_update_eol(){
fn_print_update_eol_nl(){
echo -e "${cyan}UPDATE${default}"
}
fn_print_ascii_logo(){
echo -e ""
echo -e " mdMMMMbm"
echo -e " mMMMMMMMMMMm"
echo -e " mMMMMMMMMMMMMm"
echo -e " mMMMMMMMMMMMMMMm"
echo -e " hMMMV^VMMV^VMMMh"
echo -e " MMMMM MM MMMMM"
echo -e " hMMs vv sMMh"
echo -e " hMMM: :MMMh"
echo -e " .hMMMh hMMMh."
echo -e " -dMMMh ${lightgrey}__${default} hMMMd-"
echo -e " :mMMMs ${lightgrey}||${default} sMMMm:"
echo -e " :MMMM+ ${lightgrey}||${default} ${red}_${default} +NMMN:"
echo -e " .mMMM+ ${lightgrey}========${default} +MMMm."
echo -e " yMMMy ${darkgrey}##############${default} yMMMy"
echo -e " mMMM: ${darkgrey}##############${default} :MMMm"
echo -e " mMM ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} ${lightyellow}nn${default} MMm"
echo -e " o ${lightyellow}nNNNNNNNn${default} ${lightyellow}nNNNNNNNn${default} o"
echo -e " ${lightyellow}nNNNNNNNNNn${default} ${lightyellow}nNNNNNNNNNn${default}"
echo -e " ${lightyellow}nNNNNNNNNNNN${default} ${lightyellow}NNNNNNNNNNNn${default}"
echo -e " ${lightyellow}+NNNNNNNNN:${default} ${lightyellow}:NNNNNNNNN+${default}"
echo -e " ${lightyellow}nNNNNNNN${default} /\ ${lightyellow}NNNNNNNn${default}"
echo -e " ${lightyellow}nnnnn${default} db ${lightyellow}nnnnn${default}"
echo -e ""
echo -e "${lightyellow}888${default} ${lightyellow}d8b${default} ${default}.d8888b. .d8888b. 888b d888"
echo -e "${lightyellow}888 Y8P ${default}d88P Y88b d88P Y88b 8888b d8888"
echo -e "${lightyellow}888${default} ${default}888${default} 888 Y88b. 88888b.d88888"
echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88888b.${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} 888 Y888b. 888Y88888P888"
echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}88b${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8bd8P${default} 888 88888 Y88b. 888 Y888P 888"
echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}X88K${default} 888 888 888 888 Y8P 888"
echo -e "${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y88b${default} ${lightyellow}88Y${default} ${lightyellow}.d8pq8b.${default} Y88b d88P Y88b d88P 888 * 888"
echo -e "${lightyellow}LinuxGSM${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}888${default} ${lightyellow}Y8888Y${default} ${lightyellow}888${default} ${lightyellow}888${default} Y2012P88 Y8888P 888 888"
echo -e ""
}

View File

@ -5,7 +5,7 @@
# Description: Handles CTRL-C trap to give an exit code.
fn_exit_trap(){
echo ""
echo -e ""
core_exit.sh
}

View File

@ -81,9 +81,9 @@ fi
# Fixes that are run on install only.
if [ "${function_selfname}" == "command_install.sh" ]; then
if [ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then
echo ""
echo "Applying Post-Install Fixes"
echo "================================="
echo -e ""
echo -e "Applying Post-Install Fixes"
echo -e "================================="
fn_sleep_time
if [ "${shortname}" == "kf" ]; then
fix_kf.sh

View File

@ -8,18 +8,18 @@ local commandname="FIX"
local commandaction="Fix"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "Applying WebAdmin ROOst.css fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
fn_sleep_time
echo "Applying WebAdmin CharSet fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
echo -e "Applying WebAdmin CharSet fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int"
fn_sleep_time
echo "applying server name fix."
echo -e "applying server name fix."
fn_sleep_time
echo "forcing server restart..."
echo -e "forcing server restart..."
fn_sleep_time
exitbypass=1
command_start.sh

View File

@ -8,21 +8,21 @@ local commandname="FIX"
local commandaction="Fix"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "Applying WebAdmin ROOst.css fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
fn_sleep_time
echo "Applying WebAdmin CharSet fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
echo -e "Applying WebAdmin CharSet fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/uweb.int"
fn_sleep_time
echo "Applying Steam AppID fix."
echo -e "Applying Steam AppID fix."
sed -i 's/1210/1200/g' "${systemdir}/steam_appid.txt"
fn_sleep_time
echo "applying server name fix."
echo -e "applying server name fix."
fn_sleep_time
echo "forcing server restart..."
echo -e "forcing server restart..."
fn_sleep_time
exitbypass=1
command_start.sh

View File

@ -9,6 +9,6 @@ local commandaction="Fix"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
#Set Binary Executable
echo "chmod +x ${executabledir}/${executable}"
echo -e "chmod +x ${executabledir}/${executable}"
chmod +x "${executabledir}/${executable}"
fn_sleep_time

View File

@ -8,18 +8,18 @@ local commandname="FIX"
local commandaction="Fix"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo "applying WebAdmin ut2003.css fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
echo -e "applying WebAdmin ut2003.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css"
sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ut2003.css"
fn_sleep_time
echo "applying WebAdmin CharSet fix."
echo "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
echo -e "applying WebAdmin CharSet fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int"
fn_sleep_time
echo "applying server name fix."
echo -e "applying server name fix."
fn_sleep_time
echo "forcing server restart."
echo -e "forcing server restart."
fn_sleep_time
exitbypass=1
command_start.sh

View File

@ -233,12 +233,12 @@ if [ -z "${extip}" ]; then
exitcode=$?
# Should ifconfig.co return an error will use last known IP.
if [ ${exitcode} -eq 0 ]; then
echo "${extip}" > "${tmpdir}/extip.txt"
echo -e "${extip}" > "${tmpdir}/extip.txt"
else
if [ -f "${tmpdir}/extip.txt" ]; then
extip=$(cat ${tmpdir}/extip.txt)
else
echo "x.x.x.x"
echo -e "x.x.x.x"
fi
fi
fi

View File

@ -538,7 +538,7 @@ fn_info_message_ports(){
echo -e ""
echo -e "${lightgreen}Ports${default}"
fn_messages_separator
echo -e "Change ports by editing the parameters in:"
echo -e "${lightblue}Change ports by editing the parameters in:${default}"
parmslocation="${red}UNKNOWN${default}"
# engines/games that require editing in the config file
@ -563,7 +563,7 @@ fn_info_message_ports(){
done
echo -e "${parmslocation}"
echo -e ""
echo -e "Useful port diagnostic command:"
echo -e "${lightblue}Useful port diagnostic command:${default}"
}
fn_info_message_statusbottom(){
@ -584,39 +584,39 @@ fn_info_logs(){
if [ -n "${lgsmlog}" ]; then
echo -e "\nScript log\n==================="
if [ ! "$(ls -A "${lgsmlogdir}")" ]; then
echo "${lgsmlogdir} (NO LOG FILES)"
echo -e "${lgsmlogdir} (NO LOG FILES)"
elif [ ! -s "${lgsmlog}" ]; then
echo "${lgsmlog} (LOG FILE IS EMPTY)"
echo -e "${lgsmlog} (LOG FILE IS EMPTY)"
else
echo "${lgsmlog}"
echo -e "${lgsmlog}"
tail -25 "${lgsmlog}"
fi
echo ""
echo -e ""
fi
if [ -n "${consolelog}" ]; then
echo -e "\nConsole log\n===================="
if [ ! "$(ls -A "${consolelogdir}")" ]; then
echo "${consolelogdir} (NO LOG FILES)"
echo -e "${consolelogdir} (NO LOG FILES)"
elif [ ! -s "${consolelog}" ]; then
echo "${consolelog} (LOG FILE IS EMPTY)"
echo -e "${consolelog} (LOG FILE IS EMPTY)"
else
echo "${consolelog}"
echo -e "${consolelog}"
tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }'
fi
echo ""
echo -e ""
fi
if [ -n "${gamelogdir}" ]; then
echo -e "\nServer log\n==================="
if [ ! "$(ls -A "${gamelogdir}")" ]; then
echo "${gamelogdir} (NO LOG FILES)"
echo -e "${gamelogdir} (NO LOG FILES)"
else
echo "${gamelogdir}"
echo -e "${gamelogdir}"
# dos2unix sed 's/\r//'
tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
fi
echo ""
echo -e ""
fi
}
@ -626,7 +626,7 @@ fn_info_message_ark(){
echo -e "netstat -atunp | grep ShooterGame"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
if [ "${port}" -eq "${port}" ]; then
@ -641,7 +641,7 @@ fn_info_message_ballisticoverkill(){
echo -e "netstat -atunp | grep BODS.x86"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -651,7 +651,7 @@ fn_info_message_battalion1944(){
echo -e "netstat -atunp | grep BattalionServ"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
# unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding
@ -667,7 +667,7 @@ fn_info_message_cod(){
echo -e "netstat -atunp | grep cod_lnxded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -676,7 +676,7 @@ fn_info_message_coduo(){
echo -e "netstat -atunp | grep coduo_lnxded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -685,7 +685,7 @@ fn_info_message_cod2(){
echo -e "netstat -atunp | grep cod2_lnxded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -694,7 +694,7 @@ fn_info_message_cod4(){
echo -e "netstat -atunp"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -703,7 +703,7 @@ fn_info_message_codwaw(){
echo -e "netstat -atunp | grep codwaw_lnxded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -712,7 +712,7 @@ fn_info_message_dontstarve(){
echo -e "netstat -atunp | grep dontstarve"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game: Server\tINBOUND\t${port}\tudp"
echo -e "> Game: Master\tINBOUND\t${masterport}\tudp"
echo -e "> Steam: Auth\tINBOUND\t${steamauthenticationport}\tudp"
@ -724,7 +724,7 @@ fn_info_message_eco(){
echo -e "netstat -atunp | grep mono"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
} | column -s $'\t' -t
@ -735,7 +735,7 @@ fn_info_message_etlegacy(){
echo -e "netstat -atunp | grep etlded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -744,7 +744,7 @@ fn_info_message_factorio(){
echo -e "netstat -atunp | grep factorio"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t
}
@ -753,7 +753,7 @@ fn_info_message_goldsource(){
echo -e "netstat -atunp | grep hlds_linux"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
} | column -s $'\t' -t
@ -763,7 +763,7 @@ fn_info_message_hurtworld(){
echo -e "netstat -atunp | grep Hurtworld"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -773,7 +773,7 @@ fn_info_message_inss(){
echo -e "netstat -atunp | grep Insurgency"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
@ -784,7 +784,7 @@ fn_info_message_justcause2(){
echo -e "netstat -atunp | grep Jcmp-Server"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -793,7 +793,7 @@ fn_info_message_justcause3(){
echo -e "netstat -atunp | grep Server"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> Steam\tINBOUND\t${steamport}\tudp"
@ -804,7 +804,7 @@ fn_info_message_minecraft(){
echo -e "netstat -atunp | grep java"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
@ -824,7 +824,7 @@ fn_info_message_mumble(){
echo -e "netstat -atunp | grep murmur"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Voice\tINBOUND\t${port}\tudp"
echo -e "> ServerQuery\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t
@ -833,7 +833,7 @@ fn_info_message_pstbs(){
echo -e "netstat -atunp | grep PostScriptum"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
@ -844,7 +844,7 @@ fn_info_message_projectcars(){
echo -e "netstat -atunp | grep DedicatedS"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> Steam\tINBOUND\t${steamport}\tudp"
@ -855,7 +855,7 @@ fn_info_message_projectzomboid(){
echo -e "netstat -atunp | grep java"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -864,7 +864,7 @@ fn_info_message_quake(){
echo -e "netstat -atunp | grep mvdsv"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -873,7 +873,7 @@ fn_info_message_quake2(){
echo -e "netstat -atunp | grep quake2"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -882,7 +882,7 @@ fn_info_message_quake3(){
echo -e "netstat -atunp | grep q3ded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -895,7 +895,7 @@ fn_info_message_quakelive(){
echo -e ""
fi
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
echo -e "> Rcon\tINBOUND\t${rconport}\tudp"
echo -e "> Stats\tINBOUND\t${statsport}\tudp"
@ -910,7 +910,7 @@ fn_info_message_realvirtuality(){
port="2302"
fi
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
# Don't do arithmetics if ever the port wasn't a numeric value
if [ "${port}" -eq "${port}" ]; then
@ -925,7 +925,7 @@ fn_info_message_refractor(){
echo -e "netstat -atunp | grep bf1942_lnxd"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -935,7 +935,7 @@ fn_info_message_risingworld(){
echo -e "netstat -atunp | grep java"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
echo -e "> http query\tINBOUND\t${httpqueryport}\ttcp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
@ -946,7 +946,7 @@ fn_info_message_rtcw(){
echo -e "netstat -atunp | grep iowolfded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -955,7 +955,7 @@ fn_info_message_rust(){
echo -e "netstat -atunp | grep Rust"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
} | column -s $'\t' -t
@ -965,7 +965,7 @@ fn_info_message_samp(){
echo -e "netstat -atunp | grep samp03svr"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
} | column -s $'\t' -t
}
@ -975,7 +975,7 @@ fn_info_message_seriousengine35(){
echo -e "netstat -atunp | grep Sam3_Dedicate"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -985,7 +985,7 @@ fn_info_message_sbots(){
echo -e "netstat -atunp | grep blank1"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -996,7 +996,7 @@ fn_info_message_sdtd(){
echo -e "netstat -atunp | grep 7DaysToDie"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
@ -1024,7 +1024,7 @@ fn_info_message_sof2(){
echo -e "netstat -atunp | grep sof2ded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -1033,7 +1033,7 @@ fn_info_message_source(){
echo -e "netstat -atunp | grep srcds_linux"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\ttcp/udp"
echo -e "> SourceTV\tINBOUND\t${sourcetvport}\tudp"
echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
@ -1045,7 +1045,7 @@ fn_info_message_spark(){
echo -e "netstat -atunp | grep server_linux"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp"
@ -1064,7 +1064,7 @@ fn_info_message_squad(){
echo -e "netstat -atunp | grep SquadServer"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
@ -1075,7 +1075,7 @@ fn_info_message_starbound(){
echo -e "netstat -atunp | grep starbound"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
echo -e "> Query\tINBOUND\t${queryport}\ttcp"
echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
@ -1086,7 +1086,7 @@ fn_info_message_stationeers(){
echo -e "netstat -atunp | grep rocketstation"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
echo -e "> Query\tINBOUND\t${queryport}\ttcp"
} | column -s $'\t' -t
@ -1096,7 +1096,7 @@ fn_info_message_teamspeak3(){
echo -e "netstat -atunp | grep ts3server"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Voice\tINBOUND\t${port}\tudp"
echo -e "> ServerQuery\tINBOUND\t${queryport}\ttcp"
echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
@ -1107,7 +1107,7 @@ fn_info_message_teeworlds(){
echo -e "netstat -atunp | grep teeworlds_srv"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t
}
@ -1116,7 +1116,7 @@ fn_info_message_terraria(){
echo -e "netstat -atunp | grep TerrariaServer"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
} | column -s $'\t' -t
}
@ -1125,7 +1125,7 @@ fn_info_message_towerunite(){
echo -e "netstat -atunp | grep TowerServer"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
# Don't do arithmetics if ever the port wasn't a numeric value
if [ "${port}" -eq "${port}" ]; then
@ -1179,7 +1179,7 @@ fn_info_message_unreal3(){
echo -e "netstat -atunp | grep ut3-bin"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
@ -1199,7 +1199,7 @@ fn_info_message_unturned(){
echo -e "netstat -atunp | grep Unturned"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -1212,7 +1212,7 @@ fn_info_message_kf2(){
echo -e "netstat -atunp | grep KFGame"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp\tPort=${port}"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
echo -e "> Steam\tINBOUND\t20560\tudp"
@ -1233,7 +1233,7 @@ fn_info_message_wolfensteinenemyterritory(){
echo -e "netstat -atunp | grep etded"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game/Query\tINBOUND\t${port}\tudp"
} | column -s $'\t' -t
}
@ -1243,7 +1243,7 @@ fn_info_message_wurmunlimited(){
echo -e "netstat -atunp | grep WurmServer"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\ttcp"
echo -e "> Game/Query\tINBOUND\t${queryport}\tudp"
} | column -s $'\t' -t
@ -1253,7 +1253,7 @@ fn_info_message_mta(){
echo -e "netstat -atunp | grep mta-server64"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tOUTBOUND\t${port}\tudp"
echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp"
if [ "${ase}" == "Enabled" ]; then
@ -1266,7 +1266,7 @@ fn_info_message_mordhau(){
echo -e "netstat -atunp | grep Mord"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> BeaconPort\tINBOUND\t${beaconport}\tudp"
echo -e "> Query\tINBOUND\t${queryport}\tudp"
@ -1274,20 +1274,20 @@ fn_info_message_mordhau(){
}
fn_info_message_barotrauma(){
echo "netstat -atunp | grep /./Server.bin"
echo -e "netstat -atunp | grep /./Server.bin"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Query\tINBOUND\t$((port+1))\tudp"
} | column -s $'\t' -t
}
fn_info_message_soldat() {
echo "netstat -atunp | grep soldat"
echo -e "netstat -atunp | grep soldat"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> RCON\tINBOUND\t${port}\ttcp"
echo -e "> FILES\tINBOUND\t$((port+10))\ttcp"
@ -1298,7 +1298,7 @@ fn_info_message_warfork(){
echo -e "netstat -atunp | grep wf_server"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> HTTP\tINBOUND\t${httpport}\ttcp"
} | column -s $'\t' -t

View File

@ -8,12 +8,12 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "================================="
echo "Install Complete!"
echo -e ""
echo -e "================================="
echo -e "Install Complete!"
fn_script_log_info "Install Complete!"
echo ""
echo "To start server type:"
echo "./${selfname} start"
echo ""
echo -e ""
echo -e "To start server type:"
echo -e "./${selfname} start"
echo -e ""
core_exit.sh

View File

@ -11,7 +11,7 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Checks if server cfg dir exists, creates it if it doesn't.
fn_check_cfgdir(){
if [ ! -d "${servercfgdir}" ]; then
echo "creating ${servercfgdir} config directory."
echo -e "creating ${servercfgdir} config directory."
fn_script_log_info "creating ${servercfgdir} config directory."
mkdir -pv "${servercfgdir}"
fi
@ -19,10 +19,10 @@ fn_check_cfgdir(){
# Downloads default configs from Game-Server-Configs repo to lgsm/config-default.
fn_fetch_default_config(){
echo ""
echo "Downloading ${gamename} Configs"
echo "================================="
echo "default configs from https://github.com/GameServerManagers/Game-Server-Configs"
echo -e ""
echo -e "${lightyellow}Downloading ${gamename} Configs${default}"
echo -e "================================="
echo -e "default configs from https://github.com/GameServerManagers/Game-Server-Configs"
fn_sleep_time
mkdir -p "${lgsmdir}/config-default/config-game"
githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master"
@ -35,7 +35,7 @@ fn_fetch_default_config(){
fn_default_config_remote(){
for config in "${array_configs[@]}"; do
# every config is copied
echo "copying ${config} config file."
echo -e "copying ${config} config file."
fn_script_log_info "copying ${servercfg} config file."
if [ "${config}" == "${servercfgdefault}" ]; then
mkdir -p "${servercfgdir}"
@ -55,7 +55,7 @@ fn_default_config_remote(){
# Copys local default config to server config location.
fn_default_config_local(){
echo "copying ${servercfgdefault} config file."
echo -e "copying ${servercfgdefault} config file."
cp -nv "${servercfgfullpathdefault}" "${servercfgfullpath}"
fn_sleep_time
}
@ -68,7 +68,7 @@ fn_set_config_vars(){
random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs)
servername="LinuxGSM"
rconpass="admin${random}"
echo "changing hostname."
echo -e "changing hostname."
fn_script_log_info "changing hostname."
fn_sleep_time
# prevents var from being overwritten with the servername.
@ -79,7 +79,7 @@ fn_set_config_vars(){
else
sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"
fi
echo "changing rcon/admin password."
echo -e "changing rcon/admin password."
fn_script_log_info "changing rcon/admin password."
if [ "${shortname}" == "squad" ]; then
sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg"
@ -89,7 +89,7 @@ fn_set_config_vars(){
fn_sleep_time
else
fn_script_log_warn "Config file not found, cannot alter it."
echo "Config file not found, cannot alter it."
echo -e "Config file not found, cannot alter it."
fn_sleep_time
fi
}
@ -98,21 +98,21 @@ fn_set_config_vars(){
fn_set_dst_config_vars(){
## cluster.ini
if grep -Fq "SERVERNAME" "${clustercfgfullpath}"; then
echo "changing server name."
echo -e "changing server name."
fn_script_log_info "changing server name."
sed -i "s/SERVERNAME/LinuxGSM/g" "${clustercfgfullpath}"
fn_sleep_time
echo "changing shard mode."
echo -e "changing shard mode."
fn_script_log_info "changing shard mode."
sed -i "s/USESHARDING/${sharding}/g" "${clustercfgfullpath}"
fn_sleep_time
echo "randomizing cluster key."
echo -e "randomizing cluster key."
fn_script_log_info "randomizing cluster key."
randomkey=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs)
sed -i "s/CLUSTERKEY/${randomkey}/g" "${clustercfgfullpath}"
fn_sleep_time
else
echo "${clustercfg} is already configured."
echo -e "${clustercfg} is already configured."
fn_script_log_info "${clustercfg} is already configured."
fi
@ -125,23 +125,23 @@ fn_set_dst_config_vars(){
sed -i "/SHARDNAME/d" "${servercfgfullpath}"
fi
echo "changing shard name."
echo -e "changing shard name."
fn_script_log_info "changing shard name."
sed -i "s/SHARDNAME/${shard}/g" "${servercfgfullpath}"
fn_sleep_time
echo "changing master setting."
echo -e "changing master setting."
fn_script_log_info "changing master setting."
sed -i "s/ISMASTER/${master}/g" "${servercfgfullpath}"
fn_sleep_time
## worldgenoverride.lua
if [ "${cave}" == "true" ]; then
echo "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua."
echo -e "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua."
fn_script_log_info "defining ${shard} as cave in ${servercfgdir}/worldgenoverride.lua."
echo 'return { override_enabled = true, preset = "DST_CAVE", }' > "${servercfgdir}/worldgenoverride.lua"
fi
fn_sleep_time
echo ""
echo -e ""
}
if [ "${shortname}" == "sdtd" ]; then

View File

@ -8,18 +8,18 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Enter ${gamename} Cluster Token"
echo "================================="
echo -e ""
echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}"
echo -e "================================="
fn_sleep_time
echo "A cluster token is required to run this server!"
echo "Follow the instructions in this link to obtain this key:"
echo "https://linuxgsm.com/dst-auth-token"
echo ""
echo -e "A cluster token is required to run this server!"
echo -e "Follow the instructions in this link to obtain this key:"
echo -e "https://linuxgsm.com/dst-auth-token"
echo -e ""
if [ -z "${autoinstall}" ]; then
overwritetoken="true"
if [ -s "${clustercfgdir}/cluster_token.txt" ]; then
echo "The cluster token is already set. Do you want to overwrite it?"
echo -e "The cluster token is already set. Do you want to overwrite it?"
fn_script_log_info "Don't Starve Together cluster token is already set"
if fn_prompt_yn "Continue?" N; then
overwritetoken="true"
@ -28,19 +28,19 @@ if [ -z "${autoinstall}" ]; then
fi
fi
if [ "${overwritetoken}" == "true" ]; then
echo "Once you have the cluster token, enter it below"
echo -e "Once you have the cluster token, enter it below"
echo -n "Cluster Token: "
read -r token
mkdir -pv "${clustercfgdir}"
echo "${token}" > "${clustercfgdir}/cluster_token.txt"
echo -e "${token}" > "${clustercfgdir}/cluster_token.txt"
if [ -f "${clustercfgdir}/cluster_token.txt" ]; then
echo "Don't Starve Together cluster token created"
echo -e "Don't Starve Together cluster token created"
fn_script_log_info "Don't Starve Together cluster token created"
fi
unset overwritetoken
fi
else
echo "You can add your cluster token using the following command"
echo "./${selfname} cluster-token"
echo -e "You can add your cluster token using the following command"
echo -e "./${selfname} cluster-token"
fi
echo ""
echo -e ""

View File

@ -12,26 +12,26 @@ elif [ "${shortname}" == "ut" ]; then
eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula"
fi
echo ""
echo "Accept ${gamename} EULA"
echo "================================="
echo -e ""
echo -e "${lightyellow}Accept ${gamename} EULA${default}"
echo -e "================================="
fn_sleep_time
echo "You are required to accept the EULA:"
echo "${eulaurl}"
echo ""
echo -e "You are required to accept the EULA:"
echo -e "${eulaurl}"
echo -e ""
if [ -z "${autoinstall}" ]; then
echo "By continuing you are indicating your agreement to the EULA."
echo ""
echo -e "By continuing you are indicating your agreement to the EULA."
echo -e ""
if ! fn_prompt_yn "Continue?" Y; then
core_exit.sh
fi
elif [ "${function_selfname}" == "command_start.sh" ]; then
fn_print_info "By continuing you are indicating your agreement to the EULA."
echo ""
echo -e ""
sleep 5
else
echo "By using auto-install you are indicating your agreement to the EULA."
echo ""
echo -e "By using auto-install you are indicating your agreement to the EULA."
echo -e ""
sleep 5
fi
@ -39,7 +39,7 @@ if [ "${shortname}" == "ts3" ]; then
touch "${executabledir}/.ts3server_license_accepted"
elif [ "${shortname}" == "mc" ]; then
touch "${serverfiles}/eula.txt"
echo "eula=true" > "${serverfiles}/eula.txt"
echo -e "eula=true" > "${serverfiles}/eula.txt"
elif [ "${shortname}" == "ut" ]; then
:
fi

View File

@ -7,9 +7,9 @@
local commandname="INSTALL"
local commandaction="Install"
echo ""
echo "Creating initial Factorio savefile"
echo "================================="
echo -e ""
echo -e "${lightyellow}Creating initial Factorio savefile${default}"
echo -e "================================="
fn_sleep_time
check_glibc.sh
"${executabledir}"/factorio --create "${serverfiles}/save1"

View File

@ -8,26 +8,26 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Game Server Login Token"
echo "================================="
echo -e ""
echo -e "${lightyellow}Game Server Login Token${default}"
echo -e "================================="
fn_sleep_time
if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "bs" ]; then
echo "GSLT is required to run a public ${gamename} server"
echo -e "GSLT is required to run a public ${gamename} server"
fn_script_log_info "GSLT is required to run a public ${gamename} server"
else
echo "GSLT is an optional feature for ${gamename} server"
echo -e "GSLT is an optional feature for ${gamename} server"
fn_script_log_info "GSLT is an optional feature for ${gamename} server"
fi
echo "Get more info and a token here:"
echo "https://linuxgsm.com/gslt"
echo -e "Get more info and a token here:"
echo -e "https://linuxgsm.com/gslt"
fn_script_log_info "Get more info and a token here:"
fn_script_log_info "https://linuxgsm.com/gslt"
echo ""
echo -e ""
if [ -z "${autoinstall}" ]; then
if [ "${shortname}" != "tu" ]; then
echo "Enter token below (Can be blank)."
echo -e "Enter token below (Can be blank)."
echo -n "GSLT TOKEN: "
read -r token
if ! grep -q "^gslt=" "${configdirserver}/${servicename}.cfg" > /dev/null 2>&1; then
@ -39,10 +39,10 @@ if [ -z "${autoinstall}" ]; then
fi
fn_sleep_time
if [ "${shortname}" == "tu" ]; then
echo "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
echo -e "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
fn_script_log_info "The GSLT can be changed by editing ${servercfgdir}/${servercfg}."
else
echo "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg."
echo -e "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg."
fn_script_log_info "The GSLT can be changed by editing ${configdirserver}/${servicename}.cfg."
fi
echo ""
echo -e ""

View File

@ -9,10 +9,14 @@ local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
clear
echo "================================="
echo "LinuxGSM - ${gamename}"
echo "by Daniel Gibbs"
echo "Website: https://linuxgsm.com"
echo "Contributors: https://linuxgsm.com/contrib"
echo "Donate: https://linuxgsm.com/donate"
echo "================================="
fn_print_ascii_logo
fn_sleep_time
echo -e "================================="
echo -e "${lightyellow}Linux${default}GSM_"
echo -e "by Daniel Gibbs"
echo -e "${lightblue}Game:${default}${gamename}"
echo -e "${lightblue}Website:${default} https://linuxgsm.com"
echo -e "${lightblue}Contributors:${default} https://linuxgsm.com/contrib"
echo -e "${lightblue}Donate:${default} https://linuxgsm.com/donate"
echo -e "================================="
fn_sleep_time

View File

@ -9,9 +9,9 @@ local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${checklogs}" != "1" ]; then
echo ""
echo "Creating log directories"
echo "================================="
echo -e ""
echo -e "${lightyellow}Creating log directories${default}"
echo -e "================================="
fi
fn_sleep_time
# Create LinuxGSM logs.

View File

@ -10,5 +10,5 @@ local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_information_nl "${gamename} will not function without resources!"
echo " * install default resources using ./${selfname} install-default-resources"
echo " * download resources from https://community.multitheftauto.com"
echo -e " * install default resources using ./${selfname} install-default-resources"
echo -e " * download resources from https://community.multitheftauto.com"

View File

@ -8,15 +8,15 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Server Directory"
echo "================================="
echo -e ""
echo -e "${lightyellow}Server Directory${default}"
echo -e "================================="
fn_sleep_time
if [ -d "${serverfiles}" ]; then
fn_print_warning_nl "A server is already installed here."
fi
pwd
echo ""
echo -e ""
if [ -z "${autoinstall}" ]; then
if ! fn_prompt_yn "Continue?" Y; then
exit

View File

@ -88,7 +88,7 @@ fn_install_server_files_steamcmd(){
fi
if [ "${counter}" -ge "7" ]; then
echo "Removing $(find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$')"
echo -e "Removing $(find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$')"
find "${serverfiles}" -type d -print0 | grep -Ez '[^/]{30}$' | xargs -0 rm -rf
fi
if [ "${counter}" -ge "9" ]; then
@ -139,9 +139,9 @@ fn_install_server_files_steamcmd(){
fi
}
echo ""
echo "Installing ${gamename} Server"
echo "================================="
echo -e ""
echo -e "${lightyellow}Installing ${gamename} Server${default}"
echo -e "================================="
fn_sleep_time
if [ -n "${appid}" ]; then
@ -168,8 +168,8 @@ elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]|
fi
if [ -z "${autoinstall}" ]; then
echo ""
echo "================================="
echo -e ""
echo -e "================================="
if ! fn_prompt_yn "Was the install successful?" Y; then
install_retry.sh
fi

View File

@ -8,19 +8,19 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Squad Server License"
echo "================================="
echo -e ""
echo -e "${lightyellow}Squad Server License${default}"
echo -e "================================="
fn_sleep_time
echo "Server license is an optional feature for ${gamename} server"
echo -e "Server license is an optional feature for ${gamename} server"
fn_script_log_info "Server license is an optional feature for ${gamename} server"
echo "Get more info and a server license here:"
echo "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/"
echo -e "Get more info and a server license here:"
echo -e "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/"
fn_script_log_info "Get more info and a server license here:"
fn_script_log_info "http://forums.joinsquad.com/topic/16519-server-licensing-general-info/"
echo ""
echo -e ""
fn_sleep_time
echo "The Squad server license can be changed by editing ${servercfgdir}/License.cfg."
echo -e "The Squad server license can be changed by editing ${servercfgdir}/License.cfg."
fn_script_log_info "The Squad server license can be changed by editing ${selfname}."
echo ""
echo -e ""

View File

@ -7,8 +7,8 @@
local commandname="INSTALL"
local commandaction="Install"
echo ""
echo "Installing SteamCMD"
echo "================================="
echo -e ""
echo -e "${lightyellow}Installing SteamCMD${default}"
echo -e "================================="
fn_sleep_time
check_steamcmd.sh

View File

@ -24,9 +24,9 @@ fn_install_ts3db_mariadb(){
fi
fi
echo ""
echo "Configure ${gamename} Server for MariaDB"
echo "================================="
echo -e ""
echo -e "${lightyellow}Configure ${gamename} Server for MariaDB${default}"
echo -e "================================="
fn_sleep_time
read -rp "Enter MariaDB hostname: " mariahostname
read -rp "Enter MariaDB port: " mariaport
@ -36,24 +36,24 @@ fn_install_ts3db_mariadb(){
read -rp "Enter MariaDB socket path: " mariadbsocket
{
echo "[config]"
echo "host='${mariahostname}'"
echo "port='${mariaport}'"
echo "username='${mariausername}'"
echo "password='${mariapassword}'"
echo "database='${mariadbname}'"
echo "socket='${mariadbsocket}'"
echo -e "[config]"
echo -e "host='${mariahostname}'"
echo -e "port='${mariaport}'"
echo -e "username='${mariausername}'"
echo -e "password='${mariapassword}'"
echo -e "database='${mariadbname}'"
echo -e "socket='${mariadbsocket}'"
} >> "${servercfgdir}/ts3db_mariadb.ini"
sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}"
sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}"
sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}"
echo "updating ts3db_mariadb.ini."
echo -e "updating ts3db_mariadb.ini."
fn_sleep_time
}
echo ""
echo "Select Database"
echo "================================="
echo -e ""
echo -e "${lightyellow}Select Database${default}"
echo -e "================================="
fn_sleep_time
if [ -z "${autoinstall}" ]; then
if fn_prompt_yn "Do you want to use MariaDB instead of sqlite? (MariaDB must be pre-configured)" N; then
@ -65,9 +65,9 @@ fi
install_eula.sh
echo ""
echo "Getting privilege key"
echo "================================="
echo -e ""
echo -e "${lightyellow}Getting privilege key${default}"
echo -e "================================="
fn_sleep_time
fn_print_information_nl "Save these details for later."
cd "${executabledir}" || exit

View File

@ -8,24 +8,24 @@ local commandname="INSTALL"
local commandaction="Install"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo ""
echo "Enter ${gamename} CD Key"
echo "================================="
echo -e ""
echo -e "${lightyellow}Enter ${gamename} CD Key${default}"
echo -e "================================="
fn_sleep_time
echo "To get your server listed on the Master Server list"
echo "you must get a free CD key. Get a key here:"
echo "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004"
echo ""
echo -e "To get your server listed on the Master Server list"
echo -e "you must get a free CD key. Get a key here:"
echo -e "https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004"
echo -e ""
if [ -z "${autoinstall}" ]; then
echo "Once you have the key enter it below"
echo -e "Once you have the key enter it below"
echo -n "KEY: "
read -r CODE
echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey"
echo -e ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey"
if [ -f "${systemdir}/cdkey" ]; then
fn_script_log_info "UT2K4 Server CD Key created"
fi
else
echo "You can add your key using the following command"
echo "./${selfname} server-cd-key"
echo -e "You can add your key using the following command"
echo -e "./${selfname} server-cd-key"
fi
echo ""
echo -e ""

View File

@ -46,7 +46,7 @@ fn_mod_lowercase(){
dst="$(dirname "${src}$(/)basename" "${src}" | tr 'A-Z' 'a-z')"
if [ "${src}" != "${dst}" ]
then
[ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo "${src} was not renamed"
[ ! -e "${dst}" ] && mv -T "${src}" "${dst}" || echo -e "${src} was not renamed"
local exitcode=$?
((renamedwc++))
fi
@ -105,7 +105,7 @@ fn_mod_copy_destination(){
# Add the mod to the installed-mods.txt.
fn_mod_add_list(){
if [ ! -n "$(sed -n "/^${modcommand}$/p" "${modsinstalledlistfullpath}")" ]; then
echo "${modcommand}" >> "${modsinstalledlistfullpath}"
echo -e "${modcommand}" >> "${modsinstalledlistfullpath}"
fn_script_log_info "${modcommand} added to ${modsinstalledlist}"
fi
}
@ -122,11 +122,11 @@ fn_mod_tidy_files_list(){
removefromlist="cfg;addons;RustDedicated_Data;RustDedicated_Data\/Managed;RustDedicated_Data\/Managed\/x86;RustDedicated_Data\/Managed\/x64;"
# Loop through files to remove from file list,
# generate elements to remove from list.
removefromlistamount="$(echo "${removefromlist}" | awk -F ';' '{ print NF }')"
removefromlistamount="$(echo -e "${removefromlist}" | awk -F ';' '{ print NF }')"
# Test all subvalue of "removefromlist" using the ";" separator.
for ((filesindex=1; filesindex < removefromlistamount; filesindex++)); do
# Put current file into test variable.
removefilevar="$(echo "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }')"
removefilevar="$(echo -e "${removefromlist}" | awk -F ';' -v x=${filesindex} '{ print $x }')"
# Delete line(s) matching exactly.
sed -i "/^${removefilevar}$/d" "${modsdir}/${modcommand}-files.txt"
# Exit on error.
@ -228,7 +228,7 @@ fn_mods_define(){
if [ -z "$index" ]; then
fn_script_log_fatal "index variable not set. Please report an issue."
fn_print_error "index variable not set. Please report an issue."
echo "* https://github.com/GameServerManagers/LinuxGSM/issues"
echo -e "* https://github.com/GameServerManagers/LinuxGSM/issues"
core_exit.sh
fi
modcommand="${mods_global_array[index+1]}"
@ -306,11 +306,11 @@ fn_compatible_mod_games(){
# If value is set to GAMES (ignore).
if [ "${modgames}" != "GAMES" ]; then
# How many games we need to test.
gamesamount="$(echo "${modgames}" | awk -F ';' '{ print NF }')"
gamesamount="$(echo -e "${modgames}" | awk -F ';' '{ print NF }')"
# Test all subvalue of "modgames" using the ";" separator.
for ((gamevarindex=1; gamevarindex < gamesamount; gamevarindex++)); do
# Put current game name into modtest variable.
gamemodtest="$( echo "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
gamemodtest="$( echo -e "${modgames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
# If game name matches.
if [ "${gamemodtest}" == "${gamename}" ]; then
# Mod is compatible.
@ -327,11 +327,11 @@ fn_compatible_mod_engines(){
# If value is set to ENGINES (ignore).
if [ "${modengines}" != "ENGINES" ]; then
# How many engines we need to test.
enginesamount="$(echo "${modengines}" | awk -F ';' '{ print NF }')"
enginesamount="$(echo -e "${modengines}" | awk -F ';' '{ print NF }')"
# Test all subvalue of "modengines" using the ";" separator.
for ((gamevarindex=1; gamevarindex < ${enginesamount}; gamevarindex++)); do
# Put current engine name into modtest variable.
enginemodtest="$( echo "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
enginemodtest="$( echo -e "${modengines}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
# If engine name matches.
if [ "${enginemodtest}" == "${engine}" ]; then
# Mod is compatible.
@ -348,11 +348,11 @@ fn_not_compatible_mod_games(){
# If value is set to NOTGAMES (ignore).
if [ "${modexcludegames}" != "NOTGAMES" ]; then
# How many engines we need to test.
excludegamesamount="$(echo "${modexcludegames}" | awk -F ';' '{ print NF }')"
excludegamesamount="$(echo -e "${modexcludegames}" | awk -F ';' '{ print NF }')"
# Test all subvalue of "modexcludegames" using the ";" separator.
for ((gamevarindex=1; gamevarindex < excludegamesamount; gamevarindex++)); do
# Put current engine name into modtest variable.
excludegamemodtest="$( echo "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
excludegamemodtest="$( echo -e "${modexcludegames}" | awk -F ';' -v x=${gamevarindex} '{ print $x }' )"
# If engine name matches.
if [ "${excludegamemodtest}" == "${gamename}" ]; then
# Mod is compatible.
@ -473,9 +473,9 @@ fn_mods_check_installed(){
fn_mods_count_installed
# If no mods are found.
if [ ${installedmodscount} -eq 0 ]; then
echo ""
echo -e ""
fn_print_failure_nl "No installed mods or addons were found"
echo " * Install mods using LinuxGSM first with: ./${selfname} mods-install"
echo -e " * Install mods using LinuxGSM first with: ./${selfname} mods-install"
fn_script_log_error "No installed mods or addons were found."
core_exit.sh
fi
@ -490,7 +490,7 @@ fn_check_mod_files_list(){
# If file list is empty.
if [ "${modsfilelistsize}" -eq 0 ]; then
fn_print_failure "${modcommand}-files.txt is empty"
echo "* Unable to remove ${modprettyname}"
echo -e "* Unable to remove ${modprettyname}"
fn_script_log_fatal "${modcommand}-files.txt is empty: Unable to remove ${modprettyname}."
core_exit.sh
fi

View File

@ -33,7 +33,7 @@ steamworksdownloadurl="${steamworksscrapeurl}/${steamworkslatestfile}"
steamworksurl="${steamworksdownloadurl}"
# CS:GO Mods
get5scrapepath="$(curl -sL https://ci.splewis.net/job/get5/lastSuccessfulBuild/api/xml | grep -oP "<relativePath>\K(.+)(?=</relativePath>)")"
get5latestfile="$(echo "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo "basename "@""")"
get5latestfile="$(echo -e "${get5scrapepath}" | xargs -n 1 -I @ sh -c "echo -e "basename "@""")"
get5downloadurl="https://ci.splewis.net/job/get5/lastSuccessfulBuild/artifact/${get5scrapepath}"
get5url="${get5downloadurl}"
# Oxide

View File

@ -82,26 +82,26 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
check_status.sh
if [ "${status}" != "0" ]; then
# checks if query is working null = pass.
gamedigcmd=$(echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --query_port \"${queryport}\"|jq")
gamedigcmd=$(echo -e "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --query_port \"${queryport}\"|jq")
gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --query_port "${queryport}")
querystatus=$(echo "${gamedigraw}" | jq '.error|length')
querystatus=$(echo -e "${gamedigraw}" | jq '.error|length')
if [ "${querystatus}" != "null" ]; then
gamedigcmd=$(echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${queryport}\"|jq")
gamedigcmd=$(echo -e "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${queryport}\"|jq")
gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --port "${queryport}")
querystatus=$(echo "${gamedigraw}" | jq '.error|length')
querystatus=$(echo -e "${gamedigraw}" | jq '.error|length')
fi
# server name.
gdname=$(echo "${gamedigraw}" | jq -re '.name')
gdname=$(echo -e "${gamedigraw}" | jq -re '.name')
if [ "${gdname}" == "null" ]; then
unset gdname
fi
# numplayers.
gdplayers=$(echo "${gamedigraw}" | jq -re '.players')
gdplayers=$(echo -e "${gamedigraw}" | jq -re '.players')
if [ "${gdplayers}" == "null" ]; then
unset gdplayers
elif [ "${gdplayers}" == "[]" ]; then
@ -109,7 +109,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
fi
# maxplayers.
gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers')
gdmaxplayers=$(echo -e "${gamedigraw}" | jq -re '.maxplayers')
if [ "${gdmaxplayers}" == "null" ]; then
unset maxplayers
elif [ "${gdmaxplayers}" == "[]" ]; then
@ -117,19 +117,19 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ];
fi
# current map.
gdmap=$(echo "${gamedigraw}" | jq -re '.map')
gdmap=$(echo -e "${gamedigraw}" | jq -re '.map')
if [ "${gdmap}" == "null" ]; then
unset gdmap
fi
# current gamemode.
gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s')
gdgamemode=$(echo -e "${gamedigraw}" | jq -re '.raw.rules.GameMode_s')
if [ "${gdgamemode}" == "null" ]; then
unset gdgamemode
fi
# numbots.
gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots')
gdbots=$(echo -e "${gamedigraw}" | jq -re '.raw.numbots')
if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then
unset gdbots
fi

View File

@ -68,8 +68,8 @@ fn_update_factorio_remotebuild(){
fn_update_factorio_compare(){
fn_print_dots "Checking for update: ${remotelocation}"
# Removes dots so if statement can compare version numbers.
localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]')
localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"

View File

@ -123,8 +123,8 @@ fn_update_minecraft_remotebuild(){
fn_update_minecraft_compare(){
# Removes dots so if statement can compare version numbers.
fn_print_dots "Checking for update: ${remotelocation}"
localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]')
localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"

View File

@ -127,8 +127,8 @@ fn_update_mta_remotebuild(){
fn_update_mta_compare(){
# Removes dots so if statement can compare version numbers.
fn_print_dots "Checking for update: ${remotelocation}"
localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]')
localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
if [ "${forceupdate}" == "1" ]; then

View File

@ -68,8 +68,8 @@ fn_update_mumble_remotebuild(){
fn_update_mumble_compare(){
# Removes dots so if statement can compare version numbers.
fn_print_dots "Checking for update: ${remotelocation}"
localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]')
localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"

View File

@ -160,9 +160,9 @@ fn_appmanifest_check(){
if [ "${appmanifestfilewc}" -ge "2" ]; then
fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
echo " * Check user permissions"
echo -e " * Check user permissions"
for appfile in ${appmanifestfile}; do
echo " ${appfile}"
echo -e " ${appfile}"
done
core_exit.sh
else

View File

@ -132,8 +132,8 @@ fn_update_ts3_remotebuild(){
fn_update_ts3_compare(){
# Removes dots so if statement can compare version numbers.
fn_print_dots "Checking for update: ${remotelocation}"
localbuilddigit=$(echo "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo "${remotebuild}" | tr -cd '[:digit:]')
localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ]||[ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"

View File

@ -84,14 +84,14 @@ fn_bootstrap_fetch_file(){
echo -e "FAIL"
if [ -f "${lgsmlog}" ]; then
echo -e "${remote_fileurl}" | tee -a "${lgsmlog}"
echo "${curlcmd}" | tee -a "${lgsmlog}"
echo -e "${curlcmd}" | tee -a "${lgsmlog}"
fi
exit 1
else
echo -e "OK"
fi
else
echo "[ FAIL ] Curl is not installed"
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi
# Make file chmodx if chmodx is set.
@ -149,7 +149,7 @@ fn_install_menu_bash() {
fn_print_horizontal
menu_options=()
while read -r line || [[ -n "${line}" ]]; do
var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}')
var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}')
menu_options+=( "${var}" )
done < "${options}"
menu_options+=( "Cancel" )
@ -174,8 +174,8 @@ fn_install_menu_whiptail() {
IFS=","
menu_options=()
while read -r line; do
key=$(echo "${line}" | awk -F "," '{print $3}')
val=$(echo "${line}" | awk -F "," '{print $2}')
key=$(echo -e "${line}" | awk -F "," '{print $3}')
val=$(echo -e "${line}" | awk -F "," '{print $2}')
menu_options+=( "${val//\"}" "${key//\"}" )
done < "${options}"
OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
@ -220,10 +220,10 @@ fn_server_info(){
fn_install_getopt(){
userinput="empty"
echo "Usage: $0 [option]"
echo -e "Usage: $0 [option]"
echo -e ""
echo "Installer - Linux Game Server Managers - Version ${version}"
echo "https://linuxgsm.com"
echo -e "Installer - Linux Game Server Managers - Version ${version}"
echo -e "https://linuxgsm.com"
echo -e ""
echo -e "Commands"
echo -e "install\t\t| Select server to install."
@ -244,15 +244,15 @@ fn_install_file(){
cp -R "${selfname}" "${local_filename}"
sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}"
sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}"
echo "Installed ${gamename} server as ${local_filename}"
echo ""
echo -e "Installed ${gamename} server as ${local_filename}"
echo -e ""
if [ ! -d "${serverfiles}" ]; then
echo "./${local_filename} install"
echo -e "./${local_filename} install"
else
echo "Remember to check server ports"
echo "./${local_filename} details"
echo -e "Remember to check server ports"
echo -e "./${local_filename} details"
fi
echo ""
echo -e ""
exit
}
@ -260,11 +260,11 @@ fn_install_file(){
if [ "$(whoami)" == "root" ]; then
if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then
if [ "${shortname}" == "core" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
core_functions.sh
@ -277,7 +277,7 @@ if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
echo -e "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi
@ -294,18 +294,18 @@ if [ "${shortname}" == "core" ]; then
if [ "${result}" == "${gameservername}" ]; then
fn_install_file
elif [ "${result}" == "" ]; then
echo "Install canceled"
echo -e "Install canceled"
else
echo "[ FAIL ] menu result does not match gameservername"
echo "result: ${result}"
echo "gameservername: ${gameservername}"
echo -e "[ FAIL ] menu result does not match gameservername"
echo -e "result: ${result}"
echo -e "gameservername: ${gameservername}"
fi
elif [ -n "${userinput}" ]; then
fn_server_info
if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo "[ FAIL ] unknown game server"
echo -e "[ FAIL ] unknown game server"
fi
else
fn_install_getopt

View File

@ -95,14 +95,14 @@ fn_bootstrap_fetch_file(){
echo -e "FAIL"
if [ -f "${lgsmlog}" ]; then
echo -e "${remote_fileurl}" | tee -a "${lgsmlog}"
echo "${curlcmd}" | tee -a "${lgsmlog}"
echo -e "${curlcmd}" | tee -a "${lgsmlog}"
fi
exit 1
else
echo -e "OK"
fi
else
echo "[ FAIL ] Curl is not installed"
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi
# Make file chmodx if chmodx is set.
@ -160,7 +160,7 @@ fn_install_menu_bash() {
fn_print_horizontal
menu_options=()
while read -r line || [[ -n "${line}" ]]; do
var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}')
var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}')
menu_options+=( "${var}" )
done < "${options}"
menu_options+=( "Cancel" )
@ -185,8 +185,8 @@ fn_install_menu_whiptail() {
IFS=","
menu_options=()
while read -r line; do
key=$(echo "${line}" | awk -F "," '{print $3}')
val=$(echo "${line}" | awk -F "," '{print $2}')
key=$(echo -e "${line}" | awk -F "," '{print $3}')
val=$(echo -e "${line}" | awk -F "," '{print $2}')
menu_options+=( "${val//\"}" "${key//\"}" )
done < "${options}"
OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
@ -231,10 +231,10 @@ fn_server_info(){
fn_install_getopt(){
userinput="empty"
echo "Usage: $0 [option]"
echo -e "Usage: $0 [option]"
echo -e ""
echo "Installer - Linux Game Server Managers - Version ${version}"
echo "https://linuxgsm.com"
echo -e "Installer - Linux Game Server Managers - Version ${version}"
echo -e "https://linuxgsm.com"
echo -e ""
echo -e "Commands"
echo -e "install\t\t| Select server to install."
@ -255,15 +255,15 @@ fn_install_file(){
cp -R "${selfname}" "${local_filename}"
sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}"
sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}"
echo "Installed ${gamename} server as ${local_filename}"
echo ""
echo -e "Installed ${gamename} server as ${local_filename}"
echo -e ""
if [ ! -d "${serverfiles}" ]; then
echo "./${local_filename} install"
echo -e "./${local_filename} install"
else
echo "Remember to check server ports"
echo "./${local_filename} details"
echo -e "Remember to check server ports"
echo -e "./${local_filename} details"
fi
echo ""
echo -e ""
exit
}
@ -271,11 +271,11 @@ fn_install_file(){
if [ "$(whoami)" == "root" ]; then
if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then
if [ "${shortname}" == "core" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
core_functions.sh
@ -286,7 +286,7 @@ fi
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
echo -e "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi
@ -305,18 +305,18 @@ if [ "${shortname}" == "core" ]; then
if [ "${result}" == "${gameservername}" ]; then
fn_install_file
elif [ "${result}" == "" ]; then
echo "Install canceled"
echo -e "Install canceled"
else
echo "[ FAIL ] menu result does not match gameservername"
echo "result: ${result}"
echo "gameservername: ${gameservername}"
echo -e "[ FAIL ] menu result does not match gameservername"
echo -e "result: ${result}"
echo -e "gameservername: ${gameservername}"
fi
elif [ -n "${userinput}" ]; then
fn_server_info
if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo "[ FAIL ] unknown game server"
echo -e "[ FAIL ] unknown game server"
fi
else
fn_install_getopt
@ -410,9 +410,9 @@ fn_currentstatus_ts3(){
fn_setstatus(){
fn_currentstatus_tmux
echo""
echo "Required status: ${requiredstatus}"
echo -e "Required status: ${requiredstatus}"
counter=0
echo "Current status: ${currentstatus}"
echo -e "Current status: ${currentstatus}"
while [ "${requiredstatus}" != "${currentstatus}" ]; do
counter=$((counter+1))
fn_currentstatus_tmux
@ -425,16 +425,16 @@ fn_setstatus(){
fi
if [ "${counter}" -gt "5" ]; then
currentstatus="FAIL"
echo "Current status: ${currentstatus}"
echo ""
echo "Unable to start or stop server."
echo -e "Current status: ${currentstatus}"
echo -e ""
echo -e "Unable to start or stop server."
exit 1
fi
done
echo -en "New status: ${currentstatus}\\r"
echo -e "\n"
echo "Test starting:"
echo ""
echo -e "Test starting:"
echo -e ""
}
# End of every test will expect the result to either pass or fail
@ -442,88 +442,88 @@ fn_setstatus(){
# if expecting a pass
fn_test_result_pass(){
if [ $? != 0 ]; then
echo "================================="
echo "Expected result: PASS"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: FAIL"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: PASS"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: PASS"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# if expecting a fail
fn_test_result_fail(){
if [ $? == 0 ]; then
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: PASS"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: FAIL"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# test result n/a
fn_test_result_na(){
echo "================================="
echo "Expected result: N/A"
echo "Actual result: N/A"
echo -e "================================="
echo -e "Expected result: N/A"
echo -e "Actual result: N/A"
fn_print_fail_nl "TEST N/A"
}
echo "================================="
echo "Travis CI Tests"
echo "Linux Game Server Manager"
echo "by Daniel Gibbs"
echo "Contributors: http://goo.gl/qLmitD"
echo "https://linuxgsm.com"
echo "================================="
echo ""
echo "================================="
echo "Server Tests"
echo "Using: ${gamename}"
echo "Testing Branch: $TRAVIS_BRANCH"
echo "================================="
echo -e "================================="
echo -e "Travis CI Tests"
echo -e "Linux Game Server Manager"
echo -e "by Daniel Gibbs"
echo -e "Contributors: http://goo.gl/qLmitD"
echo -e "https://linuxgsm.com"
echo -e "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests"
echo -e "Using: ${gamename}"
echo -e "Testing Branch: $TRAVIS_BRANCH"
echo -e "================================="
echo ""
echo "0.0 - Pre-test Tasks"
echo "=================================================================="
echo "Description:"
echo "Create log dir's"
echo ""
echo -e ""
echo -e "0.0 - Pre-test Tasks"
echo -e "=================================================================="
echo -e "Description:"
echo -e "Create log dir's"
echo -e ""
echo ""
echo "0.1 - Create log dir's"
echo "================================="
echo ""
echo -e ""
echo -e "0.1 - Create log dir's"
echo -e "================================="
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
install_logs.sh
)
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "0.2 - Enable dev-debug"
echo "================================="
echo "Description:"
echo "Enable dev-debug"
echo ""
echo -e ""
echo -e "0.2 - Enable dev-debug"
echo -e "================================="
echo -e "Description:"
echo -e "Enable dev-debug"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -531,21 +531,21 @@ echo ""
command_dev_debug.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.0 - Pre-install tests"
echo "=================================================================="
echo ""
echo -e ""
echo -e "1.0 - Pre-install tests"
echo -e "=================================================================="
echo -e ""
echo "1.1 - start - no files"
echo "================================="
echo "Description:"
echo "test script reaction to missing server files."
echo "Command: ./${gameservername} start"
echo ""
echo -e "1.1 - start - no files"
echo -e "================================="
echo -e "Description:"
echo -e "test script reaction to missing server files."
echo -e "Command: ./${gameservername} start"
echo -e ""
# Allows for testing not on Travis CI
if [ ! -v TRAVIS ]; then
(
@ -556,20 +556,20 @@ if [ ! -v TRAVIS ]; then
)
fn_test_result_fail
else
echo "Test bypassed"
echo -e "Test bypassed"
fi
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.2 - getopt"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername}"
echo ""
echo -e ""
echo -e "1.2 - getopt"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername}"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -577,17 +577,17 @@ echo ""
core_getopt.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.3 - getopt with incorrect args"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername} abc123"
echo ""
echo -e ""
echo -e "1.3 - getopt with incorrect args"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername} abc123"
echo -e ""
getopt="abc123"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
@ -596,20 +596,20 @@ getopt="abc123"
core_getopt.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "2.0 - Installation"
echo "=================================================================="
echo -e ""
echo -e "2.0 - Installation"
echo -e "=================================================================="
echo ""
echo "2.0 - install"
echo "================================="
echo "Description:"
echo "install ${gamename} server."
echo "Command: ./${gameservername} auto-install"
echo -e ""
echo -e "2.0 - install"
echo -e "================================="
echo -e "Description:"
echo -e "install ${gamename} server."
echo -e "Command: ./${gameservername} auto-install"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -617,20 +617,20 @@ echo "Command: ./${gameservername} auto-install"
fn_autoinstall
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.0 - Start/Stop/Restart Tests"
echo "=================================================================="
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
echo -e "=================================================================="
echo ""
echo "3.1 - start"
echo "================================="
echo "Description:"
echo "start ${gamename} server."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.1 - start"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -640,16 +640,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.2 - start - online"
echo "================================="
echo "Description:"
echo "start ${gamename} server while already running."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.2 - start - online"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server while already running."
echo -e "Command: ./${gameservername} start"
requiredstatus="ONLINE"
fn_setstatus
(
@ -659,16 +659,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.3 - start - updateonstart"
echo "================================="
echo "Description:"
echo "will update server on start."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.3 - start - updateonstart"
echo -e "================================="
echo -e "Description:"
echo -e "will update server on start."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -678,16 +678,16 @@ fn_setstatus
updateonstart="on";command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.4 - stop"
echo "================================="
echo "Description:"
echo "stop ${gamename} server."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.4 - stop"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server."
echo -e "Command: ./${gameservername} stop"
requiredstatus="ONLINE"
fn_setstatus
(
@ -697,16 +697,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.5 - stop - offline"
echo "================================="
echo "Description:"
echo "stop ${gamename} server while already stopped."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.5 - stop - offline"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server while already stopped."
echo -e "Command: ./${gameservername} stop"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -716,16 +716,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.6 - restart"
echo "================================="
echo "Description:"
echo "restart ${gamename}."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.6 - restart"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename}."
echo -e "Command: ./${gameservername} restart"
requiredstatus="ONLINE"
fn_setstatus
(
@ -735,16 +735,16 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.7 - restart - offline"
echo "================================="
echo "Description:"
echo "restart ${gamename} while already stopped."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.7 - restart - offline"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename} while already stopped."
echo -e "Command: ./${gameservername} restart"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -754,20 +754,20 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "4.0 - Update Tests"
echo "=================================================================="
echo -e ""
echo -e "4.0 - Update Tests"
echo -e "=================================================================="
echo ""
echo "4.1 - update"
echo "================================="
echo "Description:"
echo "check for updates."
echo "Command: ./${gameservername} update"
echo -e ""
echo -e "4.1 - update"
echo -e "================================="
echo -e "Description:"
echo -e "check for updates."
echo -e "Command: ./${gameservername} update"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -777,23 +777,23 @@ fn_setstatus
command_update.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.0 - Monitor Tests"
echo "=================================================================="
echo ""
echo "Server IP - Port: ${ip}:${port}"
echo "Server IP - Query Port: ${ip}:${queryport}"
echo -e ""
echo -e "5.0 - Monitor Tests"
echo -e "=================================================================="
echo -e ""
echo -e "Server IP - Port: ${ip}:${port}"
echo -e "Server IP - Query Port: ${ip}:${queryport}"
echo ""
echo "5.1 - monitor - online"
echo "================================="
echo "Description:"
echo "run monitor server while already running."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.1 - monitor - online"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor server while already running."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="ONLINE"
fn_setstatus
(
@ -803,16 +803,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.2 - monitor - offline - with lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
@ -824,16 +824,16 @@ date '+%s' > "${rootdir}/${lockselfname}"
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.3 - monitor - offline - no lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -843,16 +843,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.4 - test-alert"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} test-alert"
echo -e ""
echo -e "5.4 - test-alert"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} test-alert"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -862,20 +862,20 @@ fn_setstatus
command_test_alert.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.0 - Details Tests"
echo "=================================================================="
echo -e ""
echo -e "6.0 - Details Tests"
echo -e "=================================================================="
echo ""
echo "6.1 - details"
echo "================================="
echo "Description:"
echo "display details."
echo "Command: ./${gameservername} details"
echo -e ""
echo -e "6.1 - details"
echo -e "================================="
echo -e "Description:"
echo -e "display details."
echo -e "Command: ./${gameservername} details"
requiredstatus="ONLINE"
fn_setstatus
(
@ -885,16 +885,16 @@ fn_setstatus
command_details.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.2 - postdetails"
echo "================================="
echo "Description:"
echo "post details."
echo "Command: ./${gameservername} postdetails"
echo -e ""
echo -e "6.2 - postdetails"
echo -e "================================="
echo -e "Description:"
echo -e "post details."
echo -e "Command: ./${gameservername} postdetails"
requiredstatus="ONLINE"
fn_setstatus
(
@ -904,39 +904,39 @@ fn_setstatus
command_postdetails.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "7.0 - Backup Tests"
echo "=================================================================="
echo -e ""
echo -e "7.0 - Backup Tests"
echo -e "=================================================================="
echo ""
echo "7.1 - backup"
echo "================================="
echo "Description:"
echo "run a backup."
echo "Command: ./${gameservername} backup"
echo -e ""
echo -e "7.1 - backup"
echo -e "================================="
echo -e "Description:"
echo -e "run a backup."
echo -e "Command: ./${gameservername} backup"
requiredstatus="ONLINE"
fn_setstatus
echo "test de-activated until issue #1839 fixed"
echo -e "test de-activated until issue #1839 fixed"
#(command_backup.sh)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.0 - Development Tools Tests"
echo "=================================================================="
echo -e ""
echo -e "8.0 - Development Tools Tests"
echo -e "=================================================================="
echo ""
echo "8.1 - dev - detect glibc"
echo "================================="
echo "Description:"
echo "detect glibc."
echo "Command: ./${gameservername} detect-glibc"
echo -e ""
echo -e "8.1 - dev - detect glibc"
echo -e "================================="
echo -e "Description:"
echo -e "detect glibc."
echo -e "Command: ./${gameservername} detect-glibc"
requiredstatus="ONLINE"
fn_setstatus
(
@ -946,16 +946,16 @@ fn_setstatus
command_dev_detect_glibc.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.2 - dev - detect ldd"
echo "================================="
echo "Description:"
echo "detect ldd."
echo "Command: ./${gameservername} detect-ldd"
echo -e ""
echo -e "8.2 - dev - detect ldd"
echo -e "================================="
echo -e "Description:"
echo -e "detect ldd."
echo -e "Command: ./${gameservername} detect-ldd"
requiredstatus="ONLINE"
fn_setstatus
(
@ -965,16 +965,16 @@ fn_setstatus
command_dev_detect_ldd.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.3 - dev - detect deps"
echo "================================="
echo "Description:"
echo "detect dependencies."
echo "Command: ./${gameservername} detect-deps"
echo -e ""
echo -e "8.3 - dev - detect deps"
echo -e "================================="
echo -e "Description:"
echo -e "detect dependencies."
echo -e "Command: ./${gameservername} detect-deps"
requiredstatus="ONLINE"
fn_setstatus
(
@ -984,16 +984,16 @@ fn_setstatus
command_dev_detect_deps.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.4 - dev - query-raw"
echo "================================="
echo "Description:"
echo "raw query output."
echo "Command: ./${gameservername} query-raw"
echo -e ""
echo -e "8.4 - dev - query-raw"
echo -e "================================="
echo -e "Description:"
echo -e "raw query output."
echo -e "Command: ./${gameservername} query-raw"
requiredstatus="ONLINE"
fn_setstatus
(
@ -1003,15 +1003,15 @@ fn_setstatus
command_dev_query_raw.sh
)
fn_test_result_na
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "================================="
echo "Server Tests - Complete!"
echo "Using: ${gamename}"
echo "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests - Complete!"
echo -e "Using: ${gamename}"
echo -e "================================="
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info "Tidying up directories."

File diff suppressed because it is too large Load Diff

View File

@ -93,14 +93,14 @@ fn_bootstrap_fetch_file(){
echo -e "FAIL"
if [ -f "${lgsmlog}" ]; then
echo -e "${remote_fileurl}" | tee -a "${lgsmlog}"
echo "${curlcmd}" | tee -a "${lgsmlog}"
echo -e "${curlcmd}" | tee -a "${lgsmlog}"
fi
exit 1
else
echo -e "OK"
fi
else
echo "[ FAIL ] Curl is not installed"
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi
# Make file chmodx if chmodx is set.
@ -158,7 +158,7 @@ fn_install_menu_bash() {
fn_print_horizontal
menu_options=()
while read -r line || [[ -n "${line}" ]]; do
var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}')
var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}')
menu_options+=( "${var}" )
done < "${options}"
menu_options+=( "Cancel" )
@ -183,8 +183,8 @@ fn_install_menu_whiptail() {
IFS=","
menu_options=()
while read -r line; do
key=$(echo "${line}" | awk -F "," '{print $3}')
val=$(echo "${line}" | awk -F "," '{print $2}')
key=$(echo -e "${line}" | awk -F "," '{print $3}')
val=$(echo -e "${line}" | awk -F "," '{print $2}')
menu_options+=( "${val//\"}" "${key//\"}" )
done < "${options}"
OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
@ -229,10 +229,10 @@ fn_server_info(){
fn_install_getopt(){
userinput="empty"
echo "Usage: $0 [option]"
echo -e "Usage: $0 [option]"
echo -e ""
echo "Installer - Linux Game Server Managers - Version ${version}"
echo "https://linuxgsm.com"
echo -e "Installer - Linux Game Server Managers - Version ${version}"
echo -e "https://linuxgsm.com"
echo -e ""
echo -e "Commands"
echo -e "install\t\t| Select server to install."
@ -253,15 +253,15 @@ fn_install_file(){
cp -R "${selfname}" "${local_filename}"
sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}"
sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}"
echo "Installed ${gamename} server as ${local_filename}"
echo ""
echo -e "Installed ${gamename} server as ${local_filename}"
echo -e ""
if [ ! -d "${serverfiles}" ]; then
echo "./${local_filename} install"
echo -e "./${local_filename} install"
else
echo "Remember to check server ports"
echo "./${local_filename} details"
echo -e "Remember to check server ports"
echo -e "./${local_filename} details"
fi
echo ""
echo -e ""
exit
}
@ -269,11 +269,11 @@ fn_install_file(){
if [ "$(whoami)" == "root" ]; then
if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then
if [ "${shortname}" == "core" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
core_functions.sh
@ -286,7 +286,7 @@ if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
echo -e "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi
@ -303,18 +303,18 @@ if [ "${shortname}" == "core" ]; then
if [ "${result}" == "${gameservername}" ]; then
fn_install_file
elif [ "${result}" == "" ]; then
echo "Install canceled"
echo -e "Install canceled"
else
echo "[ FAIL ] menu result does not match gameservername"
echo "result: ${result}"
echo "gameservername: ${gameservername}"
echo -e "[ FAIL ] menu result does not match gameservername"
echo -e "result: ${result}"
echo -e "gameservername: ${gameservername}"
fi
elif [ -n "${userinput}" ]; then
fn_server_info
if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo "[ FAIL ] unknown game server"
echo -e "[ FAIL ] unknown game server"
fi
else
fn_install_getopt
@ -408,9 +408,9 @@ fn_currentstatus_ts3(){
fn_setstatus(){
fn_currentstatus_tmux
echo""
echo "Required status: ${requiredstatus}"
echo -e "Required status: ${requiredstatus}"
counter=0
echo "Current status: ${currentstatus}"
echo -e "Current status: ${currentstatus}"
while [ "${requiredstatus}" != "${currentstatus}" ]; do
counter=$((counter+1))
fn_currentstatus_tmux
@ -423,16 +423,16 @@ fn_setstatus(){
fi
if [ "${counter}" -gt "5" ]; then
currentstatus="FAIL"
echo "Current status: ${currentstatus}"
echo ""
echo "Unable to start or stop server."
echo -e "Current status: ${currentstatus}"
echo -e ""
echo -e "Unable to start or stop server."
exit 1
fi
done
echo -en "New status: ${currentstatus}\\r"
echo -e "\n"
echo "Test starting:"
echo ""
echo -e "Test starting:"
echo -e ""
}
# End of every test will expect the result to either pass or fail
@ -440,88 +440,88 @@ fn_setstatus(){
# if expecting a pass
fn_test_result_pass(){
if [ $? != 0 ]; then
echo "================================="
echo "Expected result: PASS"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: FAIL"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: PASS"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: PASS"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# if expecting a fail
fn_test_result_fail(){
if [ $? == 0 ]; then
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: PASS"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: FAIL"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# test result n/a
fn_test_result_na(){
echo "================================="
echo "Expected result: N/A"
echo "Actual result: N/A"
echo -e "================================="
echo -e "Expected result: N/A"
echo -e "Actual result: N/A"
fn_print_fail_nl "TEST N/A"
}
echo "================================="
echo "Travis CI Tests"
echo "Linux Game Server Manager"
echo "by Daniel Gibbs"
echo "Contributors: http://goo.gl/qLmitD"
echo "https://linuxgsm.com"
echo "================================="
echo ""
echo "================================="
echo "Server Tests"
echo "Using: ${gamename}"
echo "Testing Branch: $TRAVIS_BRANCH"
echo "================================="
echo -e "================================="
echo -e "Travis CI Tests"
echo -e "Linux Game Server Manager"
echo -e "by Daniel Gibbs"
echo -e "Contributors: http://goo.gl/qLmitD"
echo -e "https://linuxgsm.com"
echo -e "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests"
echo -e "Using: ${gamename}"
echo -e "Testing Branch: $TRAVIS_BRANCH"
echo -e "================================="
echo ""
echo "0.0 - Pre-test Tasks"
echo "=================================================================="
echo "Description:"
echo "Create log dir's"
echo ""
echo -e ""
echo -e "0.0 - Pre-test Tasks"
echo -e "=================================================================="
echo -e "Description:"
echo -e "Create log dir's"
echo -e ""
echo ""
echo "0.1 - Create log dir's"
echo "================================="
echo ""
echo -e ""
echo -e "0.1 - Create log dir's"
echo -e "================================="
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
install_logs.sh
)
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "0.2 - Enable dev-debug"
echo "================================="
echo "Description:"
echo "Enable dev-debug"
echo ""
echo -e ""
echo -e "0.2 - Enable dev-debug"
echo -e "================================="
echo -e "Description:"
echo -e "Enable dev-debug"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -529,21 +529,21 @@ echo ""
command_dev_debug.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.0 - Pre-install tests"
echo "=================================================================="
echo ""
echo -e ""
echo -e "1.0 - Pre-install tests"
echo -e "=================================================================="
echo -e ""
echo "1.1 - start - no files"
echo "================================="
echo "Description:"
echo "test script reaction to missing server files."
echo "Command: ./${gameservername} start"
echo ""
echo -e "1.1 - start - no files"
echo -e "================================="
echo -e "Description:"
echo -e "test script reaction to missing server files."
echo -e "Command: ./${gameservername} start"
echo -e ""
# Allows for testing not on Travis CI
if [ ! -v TRAVIS ]; then
(
@ -554,20 +554,20 @@ if [ ! -v TRAVIS ]; then
)
fn_test_result_fail
else
echo "Test bypassed"
echo -e "Test bypassed"
fi
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.2 - getopt"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername}"
echo ""
echo -e ""
echo -e "1.2 - getopt"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername}"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -575,17 +575,17 @@ echo ""
core_getopt.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.3 - getopt with incorrect args"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername} abc123"
echo ""
echo -e ""
echo -e "1.3 - getopt with incorrect args"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername} abc123"
echo -e ""
getopt="abc123"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
@ -594,20 +594,20 @@ getopt="abc123"
core_getopt.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "2.0 - Installation"
echo "=================================================================="
echo -e ""
echo -e "2.0 - Installation"
echo -e "=================================================================="
echo ""
echo "2.0 - install"
echo "================================="
echo "Description:"
echo "install ${gamename} server."
echo "Command: ./${gameservername} auto-install"
echo -e ""
echo -e "2.0 - install"
echo -e "================================="
echo -e "Description:"
echo -e "install ${gamename} server."
echo -e "Command: ./${gameservername} auto-install"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -615,20 +615,20 @@ echo "Command: ./${gameservername} auto-install"
fn_autoinstall
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.0 - Start/Stop/Restart Tests"
echo "=================================================================="
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
echo -e "=================================================================="
echo ""
echo "3.1 - start"
echo "================================="
echo "Description:"
echo "start ${gamename} server."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.1 - start"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -638,16 +638,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.2 - start - online"
echo "================================="
echo "Description:"
echo "start ${gamename} server while already running."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.2 - start - online"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server while already running."
echo -e "Command: ./${gameservername} start"
requiredstatus="ONLINE"
fn_setstatus
(
@ -657,16 +657,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.3 - start - updateonstart"
echo "================================="
echo "Description:"
echo "will update server on start."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.3 - start - updateonstart"
echo -e "================================="
echo -e "Description:"
echo -e "will update server on start."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -676,25 +676,25 @@ fn_setstatus
updateonstart="on";command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "30s Pause"
echo "================================="
echo "Description:"
echo "give time for server to fully start."
echo "Command: sleep 30"
echo -e ""
echo -e "30s Pause"
echo -e "================================="
echo -e "Description:"
echo -e "give time for server to fully start."
echo -e "Command: sleep 30"
requiredstatus="ONLINE"
fn_setstatus
sleep 30
echo ""
echo "3.4 - stop"
echo "================================="
echo "Description:"
echo "stop ${gamename} server."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.4 - stop"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server."
echo -e "Command: ./${gameservername} stop"
requiredstatus="ONLINE"
fn_setstatus
(
@ -704,16 +704,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.5 - stop - offline"
echo "================================="
echo "Description:"
echo "stop ${gamename} server while already stopped."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.5 - stop - offline"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server while already stopped."
echo -e "Command: ./${gameservername} stop"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -723,16 +723,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.6 - restart"
echo "================================="
echo "Description:"
echo "restart ${gamename}."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.6 - restart"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename}."
echo -e "Command: ./${gameservername} restart"
requiredstatus="ONLINE"
fn_setstatus
(
@ -742,16 +742,16 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.7 - restart - offline"
echo "================================="
echo "Description:"
echo "restart ${gamename} while already stopped."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.7 - restart - offline"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename} while already stopped."
echo -e "Command: ./${gameservername} restart"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -761,20 +761,20 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "4.0 - Update Tests"
echo "=================================================================="
echo -e ""
echo -e "4.0 - Update Tests"
echo -e "=================================================================="
echo ""
echo "4.1 - update"
echo "================================="
echo "Description:"
echo "check for updates."
echo "Command: ./${gameservername} update"
echo -e ""
echo -e "4.1 - update"
echo -e "================================="
echo -e "Description:"
echo -e "check for updates."
echo -e "Command: ./${gameservername} update"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -784,47 +784,47 @@ fn_setstatus
command_update.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "Inserting IP address"
echo "================================="
echo "Description:"
echo "Inserting Travis IP in to config."
echo "Allows monitor to work"
echo -e ""
echo -e "Inserting IP address"
echo -e "================================="
echo -e "Description:"
echo -e "Inserting Travis IP in to config."
echo -e "Allows monitor to work"
if [ "$(ip -o -4 addr|grep eth0)" ]; then
travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0)
else
travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0)
fi
sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties"
echo "IP: ${travisip}"
echo -e "IP: ${travisip}"
echo ""
echo "5.0 - Monitor Tests"
echo "=================================================================="
echo ""
echo "Server IP - Port: ${ip}:${port}"
echo "Server IP - Query Port: ${ip}:${queryport}"
echo -e ""
echo -e "5.0 - Monitor Tests"
echo -e "=================================================================="
echo -e ""
echo -e "Server IP - Port: ${ip}:${port}"
echo -e "Server IP - Query Port: ${ip}:${queryport}"
echo ""
echo "30s Pause"
echo "================================="
echo "Description:"
echo "give time for server to fully start."
echo "Command: sleep 30"
echo -e ""
echo -e "30s Pause"
echo -e "================================="
echo -e "Description:"
echo -e "give time for server to fully start."
echo -e "Command: sleep 30"
requiredstatus="ONLINE"
fn_setstatus
sleep 30
echo ""
echo "5.1 - monitor - online"
echo "================================="
echo "Description:"
echo "run monitor server while already running."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.1 - monitor - online"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor server while already running."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="ONLINE"
fn_setstatus
(
@ -834,16 +834,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.2 - monitor - offline - with lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
@ -855,16 +855,16 @@ date '+%s' > "${rootdir}/${lockselfname}"
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.3 - monitor - offline - no lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -874,16 +874,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.4 - test-alert"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} test-alert"
echo -e ""
echo -e "5.4 - test-alert"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} test-alert"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -893,20 +893,20 @@ fn_setstatus
command_test_alert.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.0 - Details Tests"
echo "=================================================================="
echo -e ""
echo -e "6.0 - Details Tests"
echo -e "=================================================================="
echo ""
echo "6.1 - details"
echo "================================="
echo "Description:"
echo "display details."
echo "Command: ./${gameservername} details"
echo -e ""
echo -e "6.1 - details"
echo -e "================================="
echo -e "Description:"
echo -e "display details."
echo -e "Command: ./${gameservername} details"
requiredstatus="ONLINE"
fn_setstatus
(
@ -916,16 +916,16 @@ fn_setstatus
command_details.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.2 - postdetails"
echo "================================="
echo "Description:"
echo "post details."
echo "Command: ./${gameservername} postdetails"
echo -e ""
echo -e "6.2 - postdetails"
echo -e "================================="
echo -e "Description:"
echo -e "post details."
echo -e "Command: ./${gameservername} postdetails"
requiredstatus="ONLINE"
fn_setstatus
(
@ -935,39 +935,39 @@ fn_setstatus
command_postdetails.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "7.0 - Backup Tests"
echo "=================================================================="
echo -e ""
echo -e "7.0 - Backup Tests"
echo -e "=================================================================="
echo ""
echo "7.1 - backup"
echo "================================="
echo "Description:"
echo "run a backup."
echo "Command: ./${gameservername} backup"
echo -e ""
echo -e "7.1 - backup"
echo -e "================================="
echo -e "Description:"
echo -e "run a backup."
echo -e "Command: ./${gameservername} backup"
requiredstatus="ONLINE"
fn_setstatus
echo "test de-activated until issue #1839 fixed"
echo -e "test de-activated until issue #1839 fixed"
#(command_backup.sh)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.0 - Development Tools Tests"
echo "=================================================================="
echo -e ""
echo -e "8.0 - Development Tools Tests"
echo -e "=================================================================="
echo ""
echo "8.1 - dev - detect glibc"
echo "================================="
echo "Description:"
echo "detect glibc."
echo "Command: ./${gameservername} detect-glibc"
echo -e ""
echo -e "8.1 - dev - detect glibc"
echo -e "================================="
echo -e "Description:"
echo -e "detect glibc."
echo -e "Command: ./${gameservername} detect-glibc"
requiredstatus="ONLINE"
fn_setstatus
(
@ -977,16 +977,16 @@ fn_setstatus
command_dev_detect_glibc.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.2 - dev - detect ldd"
echo "================================="
echo "Description:"
echo "detect ldd."
echo "Command: ./${gameservername} detect-ldd"
echo -e ""
echo -e "8.2 - dev - detect ldd"
echo -e "================================="
echo -e "Description:"
echo -e "detect ldd."
echo -e "Command: ./${gameservername} detect-ldd"
requiredstatus="ONLINE"
fn_setstatus
(
@ -996,16 +996,16 @@ fn_setstatus
command_dev_detect_ldd.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.3 - dev - detect deps"
echo "================================="
echo "Description:"
echo "detect dependencies."
echo "Command: ./${gameservername} detect-deps"
echo -e ""
echo -e "8.3 - dev - detect deps"
echo -e "================================="
echo -e "Description:"
echo -e "detect dependencies."
echo -e "Command: ./${gameservername} detect-deps"
requiredstatus="ONLINE"
fn_setstatus
(
@ -1015,30 +1015,30 @@ fn_setstatus
command_dev_detect_deps.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "Inserting IP address"
echo "================================="
echo "Description:"
echo "Inserting Travis IP in to config."
echo "Allows monitor to work"
echo -e ""
echo -e "Inserting IP address"
echo -e "================================="
echo -e "Description:"
echo -e "Inserting Travis IP in to config."
echo -e "Allows monitor to work"
if [ "$(ip -o -4 addr|grep eth0)" ]; then
travisip=$(ip -o -4 addr | grep eth0 | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | grep -v 127.0.0)
else
travisip=$(ip -o -4 addr | grep ens | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0)
fi
sed -i "/server-ip=/c\server-ip=${travisip}" "${serverfiles}/server.properties"
echo "IP: ${travisip}"
echo -e "IP: ${travisip}"
echo ""
echo "8.4 - dev - query-raw"
echo "================================="
echo "Description:"
echo "raw query output."
echo "Command: ./${gameservername} query-raw"
echo -e ""
echo -e "8.4 - dev - query-raw"
echo -e "================================="
echo -e "Description:"
echo -e "raw query output."
echo -e "Command: ./${gameservername} query-raw"
requiredstatus="ONLINE"
fn_setstatus
(
@ -1048,15 +1048,15 @@ fn_setstatus
command_dev_query_raw.sh
)
fn_test_result_na
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "================================="
echo "Server Tests - Complete!"
echo "Using: ${gamename}"
echo "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests - Complete!"
echo -e "Using: ${gamename}"
echo -e "================================="
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info "Tidying up directories."

View File

@ -7,26 +7,26 @@
# Documentation: https://docs.linuxgsm.com/
# Website: https://linuxgsm.com
echo "================================="
echo "Travis CI Tests"
echo "Linux Game Server Manager"
echo "by Daniel Gibbs"
echo "Contributors: http://goo.gl/qLmitD"
echo "https://linuxgsm.com"
echo "================================="
echo ""
echo "================================="
echo "Bash Analysis Tests"
echo "Using: Shellcheck"
echo "Testing Branch: $TRAVIS_BRANCH"
echo "================================="
echo ""
echo -e "================================="
echo -e "Travis CI Tests"
echo -e "Linux Game Server Manager"
echo -e "by Daniel Gibbs"
echo -e "Contributors: http://goo.gl/qLmitD"
echo -e "https://linuxgsm.com"
echo -e "================================="
echo -e ""
echo -e "================================="
echo -e "Bash Analysis Tests"
echo -e "Using: Shellcheck"
echo -e "Testing Branch: $TRAVIS_BRANCH"
echo -e "================================="
echo -e ""
scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l)
echo "Found issues: ${scissues}"
echo "================================="
echo -e "Found issues: ${scissues}"
echo -e "================================="
find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \;
echo ""
echo "================================="
echo "Bash Analysis Tests - Complete!"
echo "Using: Shellcheck"
echo "================================="
echo -e ""
echo -e "================================="
echo -e "Bash Analysis Tests - Complete!"
echo -e "Using: Shellcheck"
echo -e "================================="

View File

@ -93,14 +93,14 @@ fn_bootstrap_fetch_file(){
echo -e "FAIL"
if [ -f "${lgsmlog}" ]; then
echo -e "${remote_fileurl}" | tee -a "${lgsmlog}"
echo "${curlcmd}" | tee -a "${lgsmlog}"
echo -e "${curlcmd}" | tee -a "${lgsmlog}"
fi
exit 1
else
echo -e "OK"
fi
else
echo "[ FAIL ] Curl is not installed"
echo -e "[ FAIL ] Curl is not installed"
exit 1
fi
# Make file chmodx if chmodx is set.
@ -158,7 +158,7 @@ fn_install_menu_bash() {
fn_print_horizontal
menu_options=()
while read -r line || [[ -n "${line}" ]]; do
var=$(echo "${line}" | awk -F "," '{print $2 " - " $3}')
var=$(echo -e "${line}" | awk -F "," '{print $2 " - " $3}')
menu_options+=( "${var}" )
done < "${options}"
menu_options+=( "Cancel" )
@ -183,8 +183,8 @@ fn_install_menu_whiptail() {
IFS=","
menu_options=()
while read -r line; do
key=$(echo "${line}" | awk -F "," '{print $3}')
val=$(echo "${line}" | awk -F "," '{print $2}')
key=$(echo -e "${line}" | awk -F "," '{print $3}')
val=$(echo -e "${line}" | awk -F "," '{print $2}')
menu_options+=( "${val//\"}" "${key//\"}" )
done < "${options}"
OPTION=$(${menucmd} --title "${title}" --menu "${caption}" "${height}" "${width}" "${menuheight}" "${menu_options[@]}" 3>&1 1>&2 2>&3)
@ -229,10 +229,10 @@ fn_server_info(){
fn_install_getopt(){
userinput="empty"
echo "Usage: $0 [option]"
echo -e "Usage: $0 [option]"
echo -e ""
echo "Installer - Linux Game Server Managers - Version ${version}"
echo "https://linuxgsm.com"
echo -e "Installer - Linux Game Server Managers - Version ${version}"
echo -e "https://linuxgsm.com"
echo -e ""
echo -e "Commands"
echo -e "install\t\t| Select server to install."
@ -253,15 +253,15 @@ fn_install_file(){
cp -R "${selfname}" "${local_filename}"
sed -i -e "s/shortname=\"core\"/shortname=\"${shortname}\"/g" "${local_filename}"
sed -i -e "s/gameservername=\"core\"/gameservername=\"${gameservername}\"/g" "${local_filename}"
echo "Installed ${gamename} server as ${local_filename}"
echo ""
echo -e "Installed ${gamename} server as ${local_filename}"
echo -e ""
if [ ! -d "${serverfiles}" ]; then
echo "./${local_filename} install"
echo -e "./${local_filename} install"
else
echo "Remember to check server ports"
echo "./${local_filename} details"
echo -e "Remember to check server ports"
echo -e "./${local_filename} details"
fi
echo ""
echo -e ""
exit
}
@ -269,11 +269,11 @@ fn_install_file(){
if [ "$(whoami)" == "root" ]; then
if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then
if [ "${shortname}" == "core" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
elif [ ! -f "${functionsdir}/core_functions.sh" ]||[ ! -f "${functionsdir}/check_root.sh" ]||[ ! -f "${functionsdir}/core_messages.sh" ]; then
echo "[ FAIL ] Do NOT run this script as root!"
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
core_functions.sh
@ -286,7 +286,7 @@ if [ "${shortname}" == "core" ]; then
# Download the latest serverlist. This is the complete list of all supported servers.
fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
if [ ! -f "${serverlist}" ]; then
echo "[ FAIL ] serverlist.csv could not be loaded."
echo -e "[ FAIL ] serverlist.csv could not be loaded."
exit 1
fi
@ -303,18 +303,18 @@ if [ "${shortname}" == "core" ]; then
if [ "${result}" == "${gameservername}" ]; then
fn_install_file
elif [ "${result}" == "" ]; then
echo "Install canceled"
echo -e "Install canceled"
else
echo "[ FAIL ] menu result does not match gameservername"
echo "result: ${result}"
echo "gameservername: ${gameservername}"
echo -e "[ FAIL ] menu result does not match gameservername"
echo -e "result: ${result}"
echo -e "gameservername: ${gameservername}"
fi
elif [ -n "${userinput}" ]; then
fn_server_info
if [ "${userinput}" == "${gameservername}" ]||[ "${userinput}" == "${gamename}" ]||[ "${userinput}" == "${shortname}" ]; then
fn_install_file
else
echo "[ FAIL ] unknown game server"
echo -e "[ FAIL ] unknown game server"
fi
else
fn_install_getopt
@ -408,9 +408,9 @@ fn_currentstatus_ts3(){
fn_setstatus(){
fn_currentstatus_ts3
echo""
echo "Required status: ${requiredstatus}"
echo -e "Required status: ${requiredstatus}"
counter=0
echo "Current status: ${currentstatus}"
echo -e "Current status: ${currentstatus}"
while [ "${requiredstatus}" != "${currentstatus}" ]; do
counter=$((counter+1))
fn_currentstatus_ts3
@ -423,16 +423,16 @@ fn_setstatus(){
fi
if [ "${counter}" -gt "5" ]; then
currentstatus="FAIL"
echo "Current status: ${currentstatus}"
echo ""
echo "Unable to start or stop server."
echo -e "Current status: ${currentstatus}"
echo -e ""
echo -e "Unable to start or stop server."
exit 1
fi
done
echo -en "New status: ${currentstatus}\\r"
echo -e "\n"
echo "Test starting:"
echo ""
echo -e "Test starting:"
echo -e ""
}
# End of every test will expect the result to either pass or fail
@ -440,88 +440,88 @@ fn_setstatus(){
# if expecting a pass
fn_test_result_pass(){
if [ $? != 0 ]; then
echo "================================="
echo "Expected result: PASS"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: FAIL"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: PASS"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: PASS"
echo -e "Actual result: PASS"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# if expecting a fail
fn_test_result_fail(){
if [ $? == 0 ]; then
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: PASS"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: PASS"
fn_print_fail_nl "TEST FAILED"
exitcode=1
core_exit.sh
else
echo "================================="
echo "Expected result: FAIL"
echo "Actual result: FAIL"
echo -e "================================="
echo -e "Expected result: FAIL"
echo -e "Actual result: FAIL"
fn_print_ok_nl "TEST PASSED"
echo ""
echo -e ""
fi
}
# test result n/a
fn_test_result_na(){
echo "================================="
echo "Expected result: N/A"
echo "Actual result: N/A"
echo -e "================================="
echo -e "Expected result: N/A"
echo -e "Actual result: N/A"
fn_print_fail_nl "TEST N/A"
}
echo "================================="
echo "Travis CI Tests"
echo "Linux Game Server Manager"
echo "by Daniel Gibbs"
echo "Contributors: http://goo.gl/qLmitD"
echo "https://linuxgsm.com"
echo "================================="
echo ""
echo "================================="
echo "Server Tests"
echo "Using: ${gamename}"
echo "Testing Branch: $TRAVIS_BRANCH"
echo "================================="
echo -e "================================="
echo -e "Travis CI Tests"
echo -e "Linux Game Server Manager"
echo -e "by Daniel Gibbs"
echo -e "Contributors: http://goo.gl/qLmitD"
echo -e "https://linuxgsm.com"
echo -e "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests"
echo -e "Using: ${gamename}"
echo -e "Testing Branch: $TRAVIS_BRANCH"
echo -e "================================="
echo ""
echo "0.0 - Pre-test Tasks"
echo "=================================================================="
echo "Description:"
echo "Create log dir's"
echo ""
echo -e ""
echo -e "0.0 - Pre-test Tasks"
echo -e "=================================================================="
echo -e "Description:"
echo -e "Create log dir's"
echo -e ""
echo ""
echo "0.1 - Create log dir's"
echo "================================="
echo ""
echo -e ""
echo -e "0.1 - Create log dir's"
echo -e "================================="
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
install_logs.sh
)
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "0.2 - Enable dev-debug"
echo "================================="
echo "Description:"
echo "Enable dev-debug"
echo ""
echo -e ""
echo -e "0.2 - Enable dev-debug"
echo -e "================================="
echo -e "Description:"
echo -e "Enable dev-debug"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -529,21 +529,21 @@ echo ""
command_dev_debug.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.0 - Pre-install tests"
echo "=================================================================="
echo ""
echo -e ""
echo -e "1.0 - Pre-install tests"
echo -e "=================================================================="
echo -e ""
echo "1.1 - start - no files"
echo "================================="
echo "Description:"
echo "test script reaction to missing server files."
echo "Command: ./${gameservername} start"
echo ""
echo -e "1.1 - start - no files"
echo -e "================================="
echo -e "Description:"
echo -e "test script reaction to missing server files."
echo -e "Command: ./${gameservername} start"
echo -e ""
# Allows for testing not on Travis CI
if [ ! -v TRAVIS ]; then
(
@ -554,20 +554,20 @@ if [ ! -v TRAVIS ]; then
)
fn_test_result_fail
else
echo "Test bypassed"
echo -e "Test bypassed"
fi
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.2 - getopt"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername}"
echo ""
echo -e ""
echo -e "1.2 - getopt"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername}"
echo -e ""
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -575,17 +575,17 @@ echo ""
core_getopt.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "1.3 - getopt with incorrect args"
echo "================================="
echo "Description:"
echo "displaying options messages."
echo "Command: ./${gameservername} abc123"
echo ""
echo -e ""
echo -e "1.3 - getopt with incorrect args"
echo -e "================================="
echo -e "Description:"
echo -e "displaying options messages."
echo -e "Command: ./${gameservername} abc123"
echo -e ""
getopt="abc123"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
@ -594,20 +594,20 @@ getopt="abc123"
core_getopt.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "2.0 - Installation"
echo "=================================================================="
echo -e ""
echo -e "2.0 - Installation"
echo -e "=================================================================="
echo ""
echo "2.0 - install"
echo "================================="
echo "Description:"
echo "install ${gamename} server."
echo "Command: ./${gameservername} auto-install"
echo -e ""
echo -e "2.0 - install"
echo -e "================================="
echo -e "Description:"
echo -e "install ${gamename} server."
echo -e "Command: ./${gameservername} auto-install"
(
exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
@ -615,20 +615,20 @@ echo "Command: ./${gameservername} auto-install"
fn_autoinstall
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.0 - Start/Stop/Restart Tests"
echo "=================================================================="
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
echo -e "=================================================================="
echo ""
echo "3.1 - start"
echo "================================="
echo "Description:"
echo "start ${gamename} server."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.1 - start"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -638,16 +638,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.2 - start - online"
echo "================================="
echo "Description:"
echo "start ${gamename} server while already running."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.2 - start - online"
echo -e "================================="
echo -e "Description:"
echo -e "start ${gamename} server while already running."
echo -e "Command: ./${gameservername} start"
requiredstatus="ONLINE"
fn_setstatus
(
@ -657,16 +657,16 @@ fn_setstatus
command_start.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.3 - start - updateonstart"
echo "================================="
echo "Description:"
echo "will update server on start."
echo "Command: ./${gameservername} start"
echo -e ""
echo -e "3.3 - start - updateonstart"
echo -e "================================="
echo -e "Description:"
echo -e "will update server on start."
echo -e "Command: ./${gameservername} start"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -676,16 +676,16 @@ fn_setstatus
updateonstart="on";command_start.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.4 - stop"
echo "================================="
echo "Description:"
echo "stop ${gamename} server."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.4 - stop"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server."
echo -e "Command: ./${gameservername} stop"
requiredstatus="ONLINE"
fn_setstatus
(
@ -695,16 +695,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.5 - stop - offline"
echo "================================="
echo "Description:"
echo "stop ${gamename} server while already stopped."
echo "Command: ./${gameservername} stop"
echo -e ""
echo -e "3.5 - stop - offline"
echo -e "================================="
echo -e "Description:"
echo -e "stop ${gamename} server while already stopped."
echo -e "Command: ./${gameservername} stop"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -714,16 +714,16 @@ fn_setstatus
command_stop.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.6 - restart"
echo "================================="
echo "Description:"
echo "restart ${gamename}."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.6 - restart"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename}."
echo -e "Command: ./${gameservername} restart"
requiredstatus="ONLINE"
fn_setstatus
(
@ -733,16 +733,16 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "3.7 - restart - offline"
echo "================================="
echo "Description:"
echo "restart ${gamename} while already stopped."
echo "Command: ./${gameservername} restart"
echo -e ""
echo -e "3.7 - restart - offline"
echo -e "================================="
echo -e "Description:"
echo -e "restart ${gamename} while already stopped."
echo -e "Command: ./${gameservername} restart"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -752,20 +752,20 @@ fn_setstatus
command_restart.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "4.0 - Update Tests"
echo "=================================================================="
echo -e ""
echo -e "4.0 - Update Tests"
echo -e "=================================================================="
echo ""
echo "4.1 - update"
echo "================================="
echo "Description:"
echo "check for updates."
echo "Command: ./${gameservername} update"
echo -e ""
echo -e "4.1 - update"
echo -e "================================="
echo -e "Description:"
echo -e "check for updates."
echo -e "Command: ./${gameservername} update"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -775,23 +775,23 @@ fn_setstatus
command_update.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.0 - Monitor Tests"
echo "=================================================================="
echo ""
echo "Server IP - Port: ${ip}:${port}"
echo "Server IP - Query Port: ${ip}:${queryport}"
echo -e ""
echo -e "5.0 - Monitor Tests"
echo -e "=================================================================="
echo -e ""
echo -e "Server IP - Port: ${ip}:${port}"
echo -e "Server IP - Query Port: ${ip}:${queryport}"
echo ""
echo "5.1 - monitor - online"
echo "================================="
echo "Description:"
echo "run monitor server while already running."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.1 - monitor - online"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor server while already running."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="ONLINE"
fn_setstatus
(
@ -801,16 +801,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.2 - monitor - offline - with lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info_nl "creating lockfile."
@ -822,16 +822,16 @@ date '+%s' > "${rootdir}/${lockselfname}"
command_monitor.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.3 - monitor - offline - no lockfile"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} monitor"
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} monitor"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -841,16 +841,16 @@ fn_setstatus
command_monitor.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "5.4 - test-alert"
echo "================================="
echo "Description:"
echo "run monitor while server is offline with no lockfile."
echo "Command: ./${gameservername} test-alert"
echo -e ""
echo -e "5.4 - test-alert"
echo -e "================================="
echo -e "Description:"
echo -e "run monitor while server is offline with no lockfile."
echo -e "Command: ./${gameservername} test-alert"
requiredstatus="OFFLINE"
fn_setstatus
(
@ -860,20 +860,20 @@ fn_setstatus
command_test_alert.sh
)
fn_test_result_fail
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.0 - Details Tests"
echo "=================================================================="
echo -e ""
echo -e "6.0 - Details Tests"
echo -e "=================================================================="
echo ""
echo "6.1 - details"
echo "================================="
echo "Description:"
echo "display details."
echo "Command: ./${gameservername} details"
echo -e ""
echo -e "6.1 - details"
echo -e "================================="
echo -e "Description:"
echo -e "display details."
echo -e "Command: ./${gameservername} details"
requiredstatus="ONLINE"
fn_setstatus
(
@ -883,16 +883,16 @@ fn_setstatus
command_details.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "6.2 - postdetails"
echo "================================="
echo "Description:"
echo "post details."
echo "Command: ./${gameservername} postdetails"
echo -e ""
echo -e "6.2 - postdetails"
echo -e "================================="
echo -e "Description:"
echo -e "post details."
echo -e "Command: ./${gameservername} postdetails"
requiredstatus="ONLINE"
fn_setstatus
(
@ -902,39 +902,39 @@ fn_setstatus
command_postdetails.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "7.0 - Backup Tests"
echo "=================================================================="
echo -e ""
echo -e "7.0 - Backup Tests"
echo -e "=================================================================="
echo ""
echo "7.1 - backup"
echo "================================="
echo "Description:"
echo "run a backup."
echo "Command: ./${gameservername} backup"
echo -e ""
echo -e "7.1 - backup"
echo -e "================================="
echo -e "Description:"
echo -e "run a backup."
echo -e "Command: ./${gameservername} backup"
requiredstatus="ONLINE"
fn_setstatus
echo "test de-activated until issue #1839 fixed"
echo -e "test de-activated until issue #1839 fixed"
#(command_backup.sh)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.0 - Development Tools Tests"
echo "=================================================================="
echo -e ""
echo -e "8.0 - Development Tools Tests"
echo -e "=================================================================="
echo ""
echo "8.1 - dev - detect glibc"
echo "================================="
echo "Description:"
echo "detect glibc."
echo "Command: ./${gameservername} detect-glibc"
echo -e ""
echo -e "8.1 - dev - detect glibc"
echo -e "================================="
echo -e "Description:"
echo -e "detect glibc."
echo -e "Command: ./${gameservername} detect-glibc"
requiredstatus="ONLINE"
fn_setstatus
(
@ -944,16 +944,16 @@ fn_setstatus
command_dev_detect_glibc.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.2 - dev - detect ldd"
echo "================================="
echo "Description:"
echo "detect ldd."
echo "Command: ./${gameservername} detect-ldd"
echo -e ""
echo -e "8.2 - dev - detect ldd"
echo -e "================================="
echo -e "Description:"
echo -e "detect ldd."
echo -e "Command: ./${gameservername} detect-ldd"
requiredstatus="ONLINE"
fn_setstatus
(
@ -963,16 +963,16 @@ fn_setstatus
command_dev_detect_ldd.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.3 - dev - detect deps"
echo "================================="
echo "Description:"
echo "detect dependencies."
echo "Command: ./${gameservername} detect-deps"
echo -e ""
echo -e "8.3 - dev - detect deps"
echo -e "================================="
echo -e "Description:"
echo -e "detect dependencies."
echo -e "Command: ./${gameservername} detect-deps"
requiredstatus="ONLINE"
fn_setstatus
(
@ -982,16 +982,16 @@ fn_setstatus
command_dev_detect_deps.sh
)
fn_test_result_pass
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "8.4 - dev - query-raw"
echo "================================="
echo "Description:"
echo "raw query output."
echo "Command: ./${gameservername} query-raw"
echo -e ""
echo -e "8.4 - dev - query-raw"
echo -e "================================="
echo -e "Description:"
echo -e "raw query output."
echo -e "Command: ./${gameservername} query-raw"
requiredstatus="ONLINE"
fn_setstatus
(
@ -1001,15 +1001,15 @@ fn_setstatus
command_dev_query_raw.sh
)
fn_test_result_na
echo "run order"
echo "================="
echo -e "run order"
echo -e "================="
grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
echo ""
echo "================================="
echo "Server Tests - Complete!"
echo "Using: ${gamename}"
echo "================================="
echo -e ""
echo -e "================================="
echo -e "Server Tests - Complete!"
echo -e "Using: ${gamename}"
echo -e "================================="
requiredstatus="OFFLINE"
fn_setstatus
fn_print_info "Tidying up directories."