Browse Source
fix(log): allow logs to correctly display primary command (#2969)
pull/2990/head
Daniel Gibbs
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with
207 additions and
249 deletions
-
lgsm/functions/alert.sh
-
lgsm/functions/check_last_update.sh
-
lgsm/functions/check_version.sh
-
lgsm/functions/command_backup.sh
-
lgsm/functions/command_console.sh
-
lgsm/functions/command_debug.sh
-
lgsm/functions/command_details.sh
-
lgsm/functions/command_dev_clear_functions.sh
-
lgsm/functions/command_dev_debug.sh
-
lgsm/functions/command_dev_detect_deps.sh
-
lgsm/functions/command_dev_detect_glibc.sh
-
lgsm/functions/command_dev_detect_ldd.sh
-
lgsm/functions/command_dev_query_raw.sh
-
lgsm/functions/command_donate.sh
-
lgsm/functions/command_fastdl.sh
-
lgsm/functions/command_install.sh
-
lgsm/functions/command_install_resources_mta.sh
-
lgsm/functions/command_mods_install.sh
-
lgsm/functions/command_mods_remove.sh
-
lgsm/functions/command_mods_update.sh
-
lgsm/functions/command_monitor.sh
-
lgsm/functions/command_postdetails.sh
-
lgsm/functions/command_restart.sh
-
lgsm/functions/command_start.sh
-
lgsm/functions/command_stop.sh
-
lgsm/functions/command_test_alert.sh
-
lgsm/functions/command_ts3_server_pass.sh
-
lgsm/functions/command_update.sh
-
lgsm/functions/command_update_linuxgsm.sh
-
lgsm/functions/command_validate.sh
-
lgsm/functions/command_wipe.sh
-
lgsm/functions/compress_unreal2_maps.sh
-
lgsm/functions/compress_ut99_maps.sh
-
lgsm/functions/core_messages.sh
-
lgsm/functions/fix_kf.sh
-
lgsm/functions/fix_kf2.sh
-
lgsm/functions/fix_ro.sh
-
lgsm/functions/fix_ut2k4.sh
-
lgsm/functions/fix_ut3.sh
-
lgsm/functions/fix_wurm.sh
-
lgsm/functions/install_modules.sh
-
lgsm/functions/update_factorio.sh
-
lgsm/functions/update_minecraft.sh
-
lgsm/functions/update_minecraft_bedrock.sh
-
lgsm/functions/update_mta.sh
-
lgsm/functions/update_mumble.sh
-
lgsm/functions/update_steamcmd.sh
-
lgsm/functions/update_ts3.sh
|
|
@ -99,7 +99,7 @@ fn_alert_log |
|
|
|
if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then |
|
|
|
exitbypass=1 |
|
|
|
command_postdetails.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then |
|
|
|
fn_print_warn_nl "More Info not enabled" |
|
|
|
fn_script_log_warn "More Info alerts not enabled" |
|
|
|
|
|
@ -20,6 +20,6 @@ if [ -f "${lockdir}/lastupdate.lock" ]&&[ "${status}" != "0" ]; then |
|
|
|
fn_print_info "${selfname} has not been restarted since last update" |
|
|
|
fn_script_log_info "${selfname} has not been restarted since last update" |
|
|
|
command_restart.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
@ -16,5 +16,5 @@ if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modules |
|
|
|
fn_sleep_time |
|
|
|
fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}" |
|
|
|
command_update_linuxgsm.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Creates a .tar.gz file in the backup directory. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="BACKUP" |
|
|
|
commandaction="Backing up" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="BACKUP" |
|
|
|
commandaction="Backing up" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
|
|
|
@ -77,7 +75,7 @@ fn_backup_stop_server(){ |
|
|
|
startserver="1" |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
@ -252,7 +250,7 @@ fn_backup_start_server(){ |
|
|
|
if [ -n "${startserver}" ]; then |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -4,12 +4,11 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Gives access to the server tmux console. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="CONSOLE" |
|
|
|
commandaction="Access console" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
|
|
|
|
commandname="CONSOLE" |
|
|
|
commandaction="Access console" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
fn_print_header |
|
|
@ -38,7 +37,7 @@ else |
|
|
|
if fn_prompt_yn "Do you want to start the server?" Y; then |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Runs the server without tmux and directly from the terminal. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEBUG" |
|
|
|
commandaction="Debuging" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEBUG" |
|
|
|
commandaction="Debuging" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
# Trap to remove lockfile on quit. |
|
|
|
fn_lockfile_trap(){ |
|
|
@ -91,7 +89,7 @@ fn_print_info_nl "Stopping any running servers" |
|
|
|
fn_script_log_info "Stopping any running servers" |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
unset exitbypass |
|
|
|
fn_print_dots "Starting debug" |
|
|
|
fn_script_log_info "Starting debug" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Displays server information. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DETAILS" |
|
|
|
commandaction="Viewing details" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DETAILS" |
|
|
|
commandaction="Viewing details" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
# Run checks and gathers details to display. |
|
|
|
check.sh |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Deletes the contents of the functions dir. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-CLEAR-MODULES" |
|
|
|
commandaction="Clearing modules" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-CLEAR-MODULES" |
|
|
|
commandaction="Clearing modules" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
echo -e "=================================" |
|
|
|
echo -e "Clear Functions" |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Dev only: Enables debugging log to be saved to dev-debug.log. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-DEBUG" |
|
|
|
commandaction="Developer debug" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-DEBUG" |
|
|
|
commandaction="Developer debug" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
|
|
if [ -f "${rootdir}/.dev-debug" ]; then |
|
|
|
rm "${rootdir:?}/.dev-debug" |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Detects dependencies the server binary requires. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-DETECT-DEPS" |
|
|
|
commandaction="Developer detect deps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-DETECT-DEPS" |
|
|
|
commandaction="Developer detect deps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
echo -e "=================================" |
|
|
|
echo -e "Dependencies Checker" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Description: Automatically detects the version of GLIBC that is required. |
|
|
|
# Can check a file or directory recursively. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-DETECT-GLIBC" |
|
|
|
commandaction="Developer detect glibc" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-DETECT-GLIBC" |
|
|
|
commandaction="Developer detect glibc" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
echo -e "=================================" |
|
|
|
echo -e "glibc Requirements Checker" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Description: Automatically detects required deps using ldd. |
|
|
|
# Can check a file or directory recursively. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-DETECT-LDD" |
|
|
|
commandaction="Developer detect ldd" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-DETECT-LDD" |
|
|
|
commandaction="Developer detect ldd" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
echo -e "=================================" |
|
|
|
echo -e "Shared Object dependencies Checker" |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Raw gamedig output of the server. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEV-QUERY-RAW" |
|
|
|
commandaction="Developer query raw" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEV-QUERY-RAW" |
|
|
|
commandaction="Developer query raw" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
info_config.sh |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Shows ways to donate. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DONATE" |
|
|
|
commandaction="Donate" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DONATE" |
|
|
|
commandaction="Donate" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_print_ascii_logo |
|
|
|
echo -e "${lightyellow}Support LinuxGSM${default}" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Creates a FastDL directory. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="FASTDL" |
|
|
|
commandaction="Fastdl" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="FASTDL" |
|
|
|
commandaction="Fastdl" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
|
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Overall function for the installer. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="INSTALL" |
|
|
|
commandaction="Installing" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="INSTALL" |
|
|
|
commandaction="Installing" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
if [ "$(whoami)" = "root" ]; then |
|
|
@ -45,7 +43,7 @@ else |
|
|
|
install_ts3db.sh |
|
|
|
elif [ "${shortname}" == "mta" ]; then |
|
|
|
command_install_resources_mta.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
|
|
|
|
fix.sh |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Installs the default resources for Multi Theft Auto. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="DEFAULT-RESOURCES" |
|
|
|
commandaction="Default Resources" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="DEFAULT-RESOURCES" |
|
|
|
commandaction="Default Resources" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_install_resources(){ |
|
|
|
echo -e "" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: List and installs available mods along with mods_list.sh and mods_core.sh. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MODS-INSTALL" |
|
|
|
commandaction="Installing mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MODS-INSTALL" |
|
|
|
commandaction="Installing mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
mods_core.sh |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Uninstall mods along with mods_list.sh and mods_core.sh. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MODS-REMOVE" |
|
|
|
commandaction="Removing mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MODS-REMOVE" |
|
|
|
commandaction="Removing mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
mods_core.sh |
|
|
@ -126,7 +124,7 @@ if [ "${engine}" == "unity3d" ]&&[[ "${modprettyname}" == *"Oxide"* ]]; then |
|
|
|
fn_script_log "Validating to restore original ${gamename} files replaced by Oxide" |
|
|
|
exitbypass="1" |
|
|
|
command_validate.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
unset exitbypass |
|
|
|
fi |
|
|
|
echo -e "${modprettyname} removed" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Updates installed mods along with mods_list.sh and mods_core.sh. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MODS-UPDATE" |
|
|
|
commandaction="Updating mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MODS-UPDATE" |
|
|
|
commandaction="Updating mods" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
mods_core.sh |
|
|
|
|
|
@ -6,12 +6,10 @@ |
|
|
|
# Description: Monitors server by checking for running processes |
|
|
|
# then passes to gamedig and gsquery. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MONITOR" |
|
|
|
commandaction="Monitoring" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MONITOR" |
|
|
|
commandaction="Monitoring" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_monitor_check_lockfile(){ |
|
|
|
# Monitor does not run it lockfile is not found. |
|
|
@ -173,7 +171,7 @@ for queryattempt in {1..5}; do |
|
|
|
alert="restartquery" |
|
|
|
alert.sh |
|
|
|
command_restart.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
elif [ "${querymethod}" == "gamedig" ]; then |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Strips sensitive information out of Details output |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="POST-DETAILS" |
|
|
|
commandaction="Posting details" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="POST-DETAILS" |
|
|
|
commandaction="Posting details" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
# Set posttarget to the appropriately-defined post destination. |
|
|
|
|
|
|
|
|
|
@ -4,16 +4,14 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Restarts the server. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MODS-INSTALL" |
|
|
|
commandaction="Restarting" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MODS-INSTALL" |
|
|
|
commandaction="Restarting" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
info_config.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
core_exit.sh |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Starts the server. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="START" |
|
|
|
commandaction="Starting" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="START" |
|
|
|
commandaction="Starting" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_start_teamspeak3(){ |
|
|
|
if [ ! -f "${servercfgfullpath}" ]; then |
|
|
@ -191,7 +189,7 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon |
|
|
|
exitbypass=1 |
|
|
|
unset updateonstart |
|
|
|
command_update.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
|
|
|
|
fn_print_dots "${servername}" |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Stops the server. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="STOP" |
|
|
|
commandaction="Stopping" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="STOP" |
|
|
|
commandaction="Stopping" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
# Attempts graceful shutdown by sending 'CTRL+c'. |
|
|
|
fn_stop_graceful_ctrlc(){ |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Sends a test alert. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="TEST-ALERT" |
|
|
|
commandaction="Sending Alert" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="TEST-ALERT" |
|
|
|
commandaction="Sending Alert" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_print_dots "${servername}" |
|
|
|
check.sh |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Changes TS3 serveradmin password. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="CHANGE-PASSWORD" |
|
|
|
commandaction="Changing password" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="CHANGE-PASSWORD" |
|
|
|
commandaction="Changing password" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_serveradmin_password_prompt(){ |
|
|
|
fn_print_header |
|
|
@ -31,7 +29,7 @@ fn_serveradmin_password_set(){ |
|
|
|
ts3serverpass="1" |
|
|
|
exitbypass="1" |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fn_print_ok_nl "New password applied" |
|
|
|
fn_script_log_pass "New ServerAdmin password applied" |
|
|
|
} |
|
|
@ -43,16 +41,16 @@ if [ "${status}" != "0" ]; then |
|
|
|
# Stop any running server. |
|
|
|
exitbypass="1" |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fn_serveradmin_password_set |
|
|
|
parms="serveradmin_password=\"${newpassword}\" inifile=\"${servercfgfullpath}\" > /dev/null 2>&1" |
|
|
|
ts3serverpass="0" |
|
|
|
command_restart.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
else |
|
|
|
fn_serveradmin_password_set |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
|
|
|
|
core_exit.sh |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Handles updating of servers. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="UPDATE" |
|
|
|
commandaction="Updating" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="UPDATE" |
|
|
|
commandaction="Updating" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_print_dots "" |
|
|
|
check.sh |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Deletes the functions dir to allow re-downloading of functions from GitHub. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="UPDATE-LGSM" |
|
|
|
commandaction="Updating LinuxGSM" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="UPDATE-LGSM" |
|
|
|
commandaction="Updating LinuxGSM" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
|
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Runs a server validation. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="VALIDATE" |
|
|
|
commandaction="Validating" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="VALIDATE" |
|
|
|
commandaction="Validating" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
fn_validate(){ |
|
|
|
fn_print_warn "Validate might overwrite some customised files" |
|
|
@ -38,11 +36,11 @@ if [ "${status}" != "0" ]; then |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fn_validate |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
else |
|
|
|
fn_validate |
|
|
|
fi |
|
|
|
|
|
@ -5,12 +5,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Wipes server data, useful after updates for some games like Rust |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="WIPE" |
|
|
|
commandaction="Wiping" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="WIPE" |
|
|
|
commandaction="Wiping" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
# Provides an exit code upon error. |
|
|
|
fn_wipe_exit_code(){ |
|
|
@ -198,11 +196,11 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ |
|
|
|
fn_stop_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fn_wipe_server_files |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
else |
|
|
|
fn_wipe_server_files |
|
|
|
fi |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Compresses unreal maps. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MAP-COMPRESSOR" |
|
|
|
commandaction="Compressing maps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MAP-COMPRESSOR" |
|
|
|
commandaction="Compressing maps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
fn_print_header |
|
|
|
|
|
@ -4,12 +4,10 @@ |
|
|
|
# Website: https://linuxgsm.com |
|
|
|
# Description: Compresses unreal maps. |
|
|
|
|
|
|
|
fn_commandname(){ |
|
|
|
commandname="MAP-COMPRESSOR" |
|
|
|
commandaction="Compressing maps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
} |
|
|
|
fn_commandname |
|
|
|
commandname="MAP-COMPRESSOR" |
|
|
|
commandaction="Compressing maps" |
|
|
|
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|
|
|
fn_firstcommand_set |
|
|
|
|
|
|
|
check.sh |
|
|
|
fn_print_header |
|
|
|
|
|
@ -544,3 +544,20 @@ fn_print_restart_warning(){ |
|
|
|
done |
|
|
|
fn_print_warn_nl "${selfname} will be restarted" |
|
|
|
} |
|
|
|
|
|
|
|
# Functions below are used to ensure that logs and UI correctly reflect the command it is actually running. |
|
|
|
# Useful when a command has to call upon another command causing the other command to overrite commandname variables |
|
|
|
|
|
|
|
# Used to remember the command that ran first. |
|
|
|
fn_firstcommand_set(){ |
|
|
|
if [ -z "${firstcommandname}" ]; then |
|
|
|
firstcommandname="${commandname}" |
|
|
|
firstcommandaction="${commandaction}" |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
# Used to reset commandname variables to the command the script ran first. |
|
|
|
fn_firstcommand_reset(){ |
|
|
|
commandname="${firstcommandname}" |
|
|
|
commandaction="${firstcommandaction}" |
|
|
|
} |
|
|
|
|
|
@ -21,15 +21,15 @@ echo -e "forcing server restart..." |
|
|
|
fn_sleep_time |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -14,8 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." |
|
|
|
fn_sleep_time |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 10 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -24,15 +24,15 @@ echo -e "forcing server restart..." |
|
|
|
fn_sleep_time |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -21,15 +21,15 @@ echo -e "forcing server restart." |
|
|
|
fn_sleep_time |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 5 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -14,8 +14,8 @@ fn_print_information "starting ${gamename} server to generate configs." |
|
|
|
fn_sleep_time |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 10 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -18,10 +18,10 @@ if [ ! -d "${serverfiles}/Creative" ]; then |
|
|
|
fixbypass=1 |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 10 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
unset parmsbypass |
|
|
|
fi |
|
|
|
|
|
@ -14,4 +14,4 @@ cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.sh "${functionsdir}" |
|
|
|
cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.py "${functionsdir}" |
|
|
|
chmod +x "${functionsdir}"/* |
|
|
|
command_update_linuxgsm.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
|
|
@ -96,21 +96,21 @@ fn_update_factorio_compare(){ |
|
|
|
fn_update_factorio_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_factorio_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|
|
|
@ -44,10 +44,10 @@ fn_update_minecraft_localbuild(){ |
|
|
|
fn_script_log_info "Forcing server restart" |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
totalseconds=0 |
|
|
|
# Check again, allow time to generate logs. |
|
|
|
while [ ! -f "${serverfiles}/logs/latest.log" ]; do |
|
|
@ -159,18 +159,18 @@ fn_update_minecraft_compare(){ |
|
|
|
command_start.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_minecraft_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|
|
|
@ -47,16 +47,16 @@ fn_update_minecraft_localbuild(){ |
|
|
|
if [ "${status}" == "0" ]; then |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
sleep 3 |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
@ -126,18 +126,18 @@ fn_update_minecraft_compare(){ |
|
|
|
command_start.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_minecraft_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|
|
|
@ -40,7 +40,7 @@ fn_update_mta_localbuild(){ |
|
|
|
command_stop.sh |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
totalseconds=0 |
|
|
|
# Check again, allow time to generate logs. |
|
|
|
while [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; do |
|
|
@ -155,18 +155,18 @@ fn_update_mta_compare(){ |
|
|
|
command_start.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_mta_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|
|
|
@ -91,18 +91,18 @@ fn_update_mumble_compare(){ |
|
|
|
command_start.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_mumble_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|
|
|
@ -106,12 +106,12 @@ fn_update_steamcmd_compare(){ |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_dl_steamcmd |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
@ -203,12 +203,12 @@ if [ "${forceupdate}" == "1" ]; then |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fn_dl_steamcmd |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
else |
|
|
|
fn_dl_steamcmd |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
|
|
@ -44,7 +44,7 @@ fn_update_ts3_localbuild(){ |
|
|
|
command_stop.sh |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
totalseconds=0 |
|
|
|
# Check again, allow time to generate logs. |
|
|
|
while [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do |
|
|
@ -153,18 +153,18 @@ fn_update_ts3_compare(){ |
|
|
|
command_start.sh |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
# If server started. |
|
|
|
else |
|
|
|
fn_print_restart_warning |
|
|
|
exitbypass=1 |
|
|
|
command_stop.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
exitbypass=1 |
|
|
|
fn_update_ts3_dl |
|
|
|
exitbypass=1 |
|
|
|
command_start.sh |
|
|
|
fn_commandname |
|
|
|
fn_firstcommand_reset |
|
|
|
fi |
|
|
|
date +%s > "${lockdir}/lastupdate.lock" |
|
|
|
alert="update" |
|
|
|