Daniel Gibbs пре 10 година
родитељ
комит
97864ef769

+ 7 - 7
lgsm/functions/alert.sh

@@ -7,25 +7,25 @@ lgsm_version="210516"
 # Description: Overall function for managing alerts.
 # Description: Overall function for managing alerts.
 
 
 fn_alert_test(){
 fn_alert_test(){
-	fn_script_log "Sending test alert"
+	fn_script_log_info "Sending test alert"
 	alertsubject="LGSM - Test Alert - ${servername}"
 	alertsubject="LGSM - Test Alert - ${servername}"
 	alertbody="LGSM test alert, how you read?"
 	alertbody="LGSM test alert, how you read?"
 }
 }
 
 
 fn_alert_restart(){
 fn_alert_restart(){
-	fn_script_log "Sending restart alert: ${executable} process not running"
+	fn_script_log_info "Sending restart alert: ${executable} process not running"
 	alertsubject="LGSM - Restarted - ${servername}"
 	alertsubject="LGSM - Restarted - ${servername}"
 	alertbody="${servicename} ${executable} process not running"
 	alertbody="${servicename} ${executable} process not running"
 }
 }
 
 
 fn_alert_restart_query(){
 fn_alert_restart_query(){
-	fn_script_log "Sending restart alert: ${gsquerycmd}"
+	fn_script_log_info "Sending restart alert: ${gsquerycmd}"
 	alertsubject="LGSM - Restarted - ${servername}"
 	alertsubject="LGSM - Restarted - ${servername}"
 	alertbody="gsquery.py failed to query: ${gsquerycmd}"
 	alertbody="gsquery.py failed to query: ${gsquerycmd}"
 }
 }
 
 
 fn_alert_update(){
 fn_alert_update(){
-	fn_script_log "Sending update alert"
+	fn_script_log_info "Sending update alert"
 	alertsubject="LGSM - Updated - ${servername}"
 	alertsubject="LGSM - Updated - ${servername}"
 	alertbody="${servicename} recieved update"
 	alertbody="${servicename} recieved update"
 }
 }
@@ -44,7 +44,7 @@ if [ "${emailnotification}" == "on" ]||[ "${emailalert}" == "on" ]&&[ -n "${emai
 	alert_email.sh
 	alert_email.sh
 elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_info_nl "Email alerts not enabled"
 	fn_print_info_nl "Email alerts not enabled"
-	fn_script_log "Email alerts not enabled"
+	fn_script_log_info "Email alerts not enabled"
 elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_fail_nl "Email not set"
 	fn_print_fail_nl "Email not set"
 	fn_script_log "Email not set"
 	fn_script_log "Email not set"
@@ -54,8 +54,8 @@ if [ "${pushbulletalert}" == "on" ]&&[ -n "${pushbullettoken}" ]; then
 	alert_pushbullet.sh
 	alert_pushbullet.sh
 elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 elif [ "${pushbulletalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_info_nl "Pushbullet alerts not enabled"
 	fn_print_info_nl "Pushbullet alerts not enabled"
-	fn_script_log "Pushbullet alerts not enabled"
+	fn_script_log_info "Pushbullet alerts not enabled"
 elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 elif [ -z "${pushbullettoken}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_fail_nl "Pushbullet token not set"
 	fn_print_fail_nl "Pushbullet token not set"
-	fn_script_log "Pushbullet token not set"
+	fn_script_log_warn "Pushbullet token not set"
 fi
 fi

+ 2 - 2
lgsm/functions/alert_email.sh

@@ -234,8 +234,8 @@ mail -s "${alertsubject}" "${email}" < "${emaillog}"
 exitcode=$?
 exitcode=$?
 if [ "${exitcode}" == "0" ]; then
 if [ "${exitcode}" == "0" ]; then
 	fn_print_ok_nl "Sending alert to ${email}"
 	fn_print_ok_nl "Sending alert to ${email}"
-	fn_script_log "Success! Sending alert to ${email}"
+	fn_script_log_pass "Sending alert to ${email}"
 else
 else
 	fn_print_fail_nl "Sending alert to ${email}"
 	fn_print_fail_nl "Sending alert to ${email}"
-	fn_script_log "Failure! Sending alert to ${email}"
+	fn_script_log_fatal "Sending alert to ${email}"
 fi
 fi

+ 2 - 2
lgsm/functions/alert_pushbullet.sh

@@ -15,8 +15,8 @@ pushbulletsend=$(curl --silent -u """${pushbullettoken}"":" -d type="note" -d bo
 
 
 if [ "${pushbulletsend}" == "invalid_access_token" ]; then
 if [ "${pushbulletsend}" == "invalid_access_token" ]; then
 	fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token"
 	fn_print_fail_nl "Sending Pushbullet alert: invalid_access_token"
-	fn_script_log "Failure! Sending Pushbullet alert: invalid_access_token"
+	fn_script_log_fatal "Sending Pushbullet alert: invalid_access_token"
 else
 else
 	fn_print_ok_nl "Sending Pushbullet alert"
 	fn_print_ok_nl "Sending Pushbullet alert"
-	fn_script_log "Complete! Sent Pushbullet alert"
+	fn_script_log_pass "Sent Pushbullet alert"
 fi
 fi

+ 2 - 2
lgsm/functions/check_config.sh

@@ -10,8 +10,8 @@ if [ ! -e "${servercfgfullpath}" ]; then
 	if [ "${gamename}" != "Hurtworld" ]; then
 	if [ "${gamename}" != "Hurtworld" ]; then
 		fn_print_warn_nl "Config file missing!"
 		fn_print_warn_nl "Config file missing!"
 		echo "${servercfgfullpath}"
 		echo "${servercfgfullpath}"
-		fn_script_log "Configuration file missing!"
-		fn_script_log "${servercfgfullpath}"
+		fn_script_log_warn "Configuration file missing!"
+		fn_script_log_warn "${servercfgfullpath}"
 		sleep 2
 		sleep 2
 	fi
 	fi
 fi
 fi

+ 2 - 2
lgsm/functions/check_deps.sh

@@ -65,7 +65,7 @@ fn_found_missing_deps(){
 		fn_print_dots "Checking dependencies"
 		fn_print_dots "Checking dependencies"
 		sleep 2
 		sleep 2
 		fn_print_warn "Checking dependencies: missing: \e[0;31m${array_deps_missing[@]}\e[0m"
 		fn_print_warn "Checking dependencies: missing: \e[0;31m${array_deps_missing[@]}\e[0m"
-		fn_script_log "Checking dependencies: missing: \e[0;31m${array_deps_missing[@]}\e[0m"
+		fn_script_log_info "Checking dependencies: missing: \e[0;31m${array_deps_missing[@]}\e[0m"
 		sleep 1
 		sleep 1
 		echo -e ""
 		echo -e ""
 		sudo -n true > /dev/null 2>&1
 		sudo -n true > /dev/null 2>&1
@@ -88,7 +88,7 @@ fn_found_missing_deps(){
 		else
 		else
 			echo ""
 			echo ""
 			fn_print_infomation_nl "$(whoami) does not have sudo access. Please manually install dependencies"
 			fn_print_infomation_nl "$(whoami) does not have sudo access. Please manually install dependencies"
-			fn_script_log "$(whoami) does not have sudo access. Please manually install dependencies"
+			fn_script_log_info "$(whoami) does not have sudo access. Please manually install dependencies"
 			echo ""
 			echo ""
 			if [ -n "$(command -v dpkg-query)" ]; then
 			if [ -n "$(command -v dpkg-query)" ]; then
 				echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}"
 				echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}"

+ 1 - 1
lgsm/functions/command_fastdl.sh

@@ -26,7 +26,7 @@ fn_check_bzip2(){
 	if [ -z "$(command -v bzip2)" ]; then
 	if [ -z "$(command -v bzip2)" ]; then
 		bzip2installed="0"
 		bzip2installed="0"
 		fn_print_info "bzip2 is not installed !"
 		fn_print_info "bzip2 is not installed !"
-		fn_script_log "bzip2 is not installed"
+		fn_script_log_info "bzip2 is not installed"
 		echo -en "\n"
 		echo -en "\n"
 		sleep 1
 		sleep 1
 		echo "We advise using it"
 		echo "We advise using it"

+ 0 - 1
lgsm/functions/command_monitor.sh

@@ -85,7 +85,6 @@ check.sh
 logs.sh
 logs.sh
 info_config.sh
 info_config.sh
 fn_print_dots "${servername}"
 fn_print_dots "${servername}"
-fn_script_log "${servername}"
 sleep 1
 sleep 1
 fn_monitor_check_lockfile
 fn_monitor_check_lockfile
 fn_monitor_check_update
 fn_monitor_check_update

+ 2 - 3
lgsm/functions/command_stop.sh

@@ -242,7 +242,7 @@ fn_stop_pre_check(){
 		check_status.sh
 		check_status.sh
 		if [ "${status}" == "0" ]; then
 		if [ "${status}" == "0" ]; then
 			fn_print_ok_nl "${servername} is already stopped"
 			fn_print_ok_nl "${servername} is already stopped"
-			fn_script_log "${servername} is already stopped"
+			fn_script_log_pass "${servername} is already stopped"
 		else
 		else
 			fn_stop_teamspeak3
 			fn_stop_teamspeak3
 		fi
 		fi
@@ -250,7 +250,7 @@ fn_stop_pre_check(){
 		check_status.sh
 		check_status.sh
 		if [ "${status}" == "0" ]; then
 		if [ "${status}" == "0" ]; then
 			fn_print_ok_nl "${servername} is already stopped"
 			fn_print_ok_nl "${servername} is already stopped"
-			fn_script_log "${servername} is already stopped"
+			fn_script_log_pass "${servername} is already stopped"
 		else
 		else
 			fn_stop_graceful_select
 			fn_stop_graceful_select
 		fi
 		fi
@@ -260,7 +260,6 @@ fn_stop_pre_check(){
 check.sh
 check.sh
 info_config.sh
 info_config.sh
 fn_print_dots "${servername}"
 fn_print_dots "${servername}"
-fn_script_log "${servername}"
 sleep 1
 sleep 1
 fn_stop_pre_check
 fn_stop_pre_check
 core_exit.sh
 core_exit.sh

+ 1 - 1
lgsm/functions/core_dl.sh

@@ -51,7 +51,7 @@ fn_dl_extract(){
 	extractdir="${3}"
 	extractdir="${3}"
 	# extracts archives
 	# extracts archives
 	echo -ne "extracting ${filename}..."
 	echo -ne "extracting ${filename}..."
-	fn_script_log "extracting download"
+	fn_script_log_info "extracting download"
 	mime=$(file -b --mime-type "${filedir}/${filename}")
 	mime=$(file -b --mime-type "${filedir}/${filename}")
 
 
 	if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then
 	if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then

+ 0 - 1
lgsm/functions/fn_update_functions

@@ -7,7 +7,6 @@ lgsm_version="210516"
 # Description: LEGACY FUNCTION Deletes the functions dir to allow re-downloading of functions from GitHub.
 # Description: LEGACY FUNCTION Deletes the functions dir to allow re-downloading of functions from GitHub.
 
 
 fn_print_dots "Updating functions"
 fn_print_dots "Updating functions"
-fn_script_log "Updating functions"
 sleep 1
 sleep 1
 echo -ne "\n"
 echo -ne "\n"
 rm -rfv "${rootdir}/functions/"*
 rm -rfv "${rootdir}/functions/"*

+ 5 - 5
lgsm/functions/install_gslt.sh

@@ -14,16 +14,16 @@ echo "================================="
 sleep 1
 sleep 1
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	echo "GSLT is required to run a public ${gamename} server"
 	echo "GSLT is required to run a public ${gamename} server"
-	fn_script_log "GSLT is required to run a public ${gamename} server"
+	fn_script_log_info "GSLT is required to run a public ${gamename} server"
 else
 else
 	echo "GSLT is an optional feature for ${gamename} server"
 	echo "GSLT is an optional feature for ${gamename} server"
-	fn_script_log "GSLT is an optional feature for ${gamename} server"
+	fn_script_log_info "GSLT is an optional feature for ${gamename} server"
 fi
 fi
 
 
 echo "Get more info and a token here:"
 echo "Get more info and a token here:"
 echo "https://gameservermanagers.com/gslt"
 echo "https://gameservermanagers.com/gslt"
-fn_script_log "Get more info and a token here:"
-fn_script_log "https://gameservermanagers.com/gslt"
+fn_script_log_info "Get more info and a token here:"
+fn_script_log_info "https://gameservermanagers.com/gslt"
 echo ""
 echo ""
 if [ -z "${autoinstall}" ]; then
 if [ -z "${autoinstall}" ]; then
 	echo "Enter token below (Can be blank)."
 	echo "Enter token below (Can be blank)."
@@ -33,5 +33,5 @@ if [ -z "${autoinstall}" ]; then
 fi
 fi
 sleep 1
 sleep 1
 echo "The GSLT can be changed by editing ${selfname}."
 echo "The GSLT can be changed by editing ${selfname}."
-fn_script_log "The GSLT can be changed by editing ${selfname}."
+fn_script_log_info "The GSLT can be changed by editing ${selfname}."
 echo ""
 echo ""

+ 1 - 1
lgsm/functions/install_logs.sh

@@ -40,4 +40,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then
 	fi
 	fi
 fi
 fi
 sleep 1
 sleep 1
-fn_script_log "logs installed"
+fn_script_log_info "logs installed"

+ 1 - 1
lgsm/functions/install_ut2k4_key.sh

@@ -20,7 +20,7 @@ if [ -z "${autoinstall}" ]; then
 	read CODE
 	read CODE
 	echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey"
 	echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey"
 	if [ -f "${systemdir}/cdkey" ]; then
 	if [ -f "${systemdir}/cdkey" ]; then
-		fn_script_log "UT2K4 Server CD Key created"
+		fn_script_log_info "UT2K4 Server CD Key created"
 	fi
 	fi
 else
 else
 	echo "You can add your key using the following command"
 	echo "You can add your key using the following command"

+ 2 - 3
lgsm/functions/logs.sh

@@ -20,7 +20,7 @@ fi
 if [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then
 if [ "${function_selfname}" == "command_start.sh" ] && [ -n "${gamelogfile}" ]; then
 	if [ -n "$(find "${systemdir}" -name "gamelog*.log")" ]; then
 	if [ -n "$(find "${systemdir}" -name "gamelog*.log")" ]; then
 		fn_print_info "Moving game logs to ${gamelogdir}"
 		fn_print_info "Moving game logs to ${gamelogdir}"
-		fn_script_log "Moving game logs to ${gamelogdir}"
+		fn_script_log_info "Moving game logs to ${gamelogdir}"
 		echo -en "\n"
 		echo -en "\n"
 		sleep 1
 		sleep 1
 		mv "${systemdir}"/gamelog*.log "${gamelogdir}"
 		mv "${systemdir}"/gamelog*.log "${gamelogdir}"
@@ -39,9 +39,8 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
 	scriptcount="0" ; consolecount="0" ; gamecount="0" ; srcdscount="0" ; smcount="0" ; ulxcount="0" ; darkrpcount="0" ; legacycount="0"
 	scriptcount="0" ; consolecount="0" ; gamecount="0" ; srcdscount="0" ; smcount="0" ; ulxcount="0" ; darkrpcount="0" ; legacycount="0"
 	sleep 1
 	sleep 1
 	fn_print_ok_nl "Starting"
 	fn_print_ok_nl "Starting"
-	fn_script_log "Starting"
 	fn_print_info_nl "Removing logs older than "${logdays}" days"
 	fn_print_info_nl "Removing logs older than "${logdays}" days"
-	fn_script_log "Removing logs older than "${logdays}" days"
+	fn_script_log_info "Removing logs older than "${logdays}" days"
 	# Logging logfiles to be removed according to "${logdays}", counting and removing them
 	# Logging logfiles to be removed according to "${logdays}", counting and removing them
 	# Script logfiles
 	# Script logfiles
 	find "${scriptlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
 	find "${scriptlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"

+ 25 - 24
lgsm/functions/update_check.sh

@@ -23,7 +23,7 @@ fn_appmanifestcheck(){
 	if [ "${appmanifestfilewc}" -ge "2" ]; then
 	if [ "${appmanifestfilewc}" -ge "2" ]; then
 		sleep 1
 		sleep 1
 		fn_print_warn "Multiple appmanifest_${appid}.acf files found"
 		fn_print_warn "Multiple appmanifest_${appid}.acf files found"
-		fn_script_log "Warning! Multiple appmanifest_${appid}.acf files found"
+		fn_script_log_warn "Multiple appmanifest_${appid}.acf files found"
 		sleep 2
 		sleep 2
 		fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files"
 		fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files"
 		sleep 1
 		sleep 1
@@ -34,7 +34,7 @@ fn_appmanifestcheck(){
 		fn_appmanifestinfo
 		fn_appmanifestinfo
 		if [ "${appmanifestfilewc}" -ge "2" ]; then
 		if [ "${appmanifestfilewc}" -ge "2" ]; then
 			fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
 			fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
-			fn_script_log "Failure! Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
+			fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files"
 			sleep 1
 			sleep 1
 			echo ""
 			echo ""
 			echo "	Check user permissions"
 			echo "	Check user permissions"
@@ -45,10 +45,10 @@ fn_appmanifestcheck(){
 		else
 		else
 			sleep 1
 			sleep 1
 			fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
 			fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
-			fn_script_log "Success! Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
+			fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files"
 			sleep 1
 			sleep 1
 			fn_print_info_nl "Forcing update to correct issue"
 			fn_print_info_nl "Forcing update to correct issue"
-			fn_script_log "Forcing update to correct issue"
+			fn_script_log_info "Forcing update to correct issue"
 			sleep 1
 			sleep 1
 			update_dl.sh
 			update_dl.sh
 			update_check.sh
 			update_check.sh
@@ -56,15 +56,15 @@ fn_appmanifestcheck(){
 	elif [ "${appmanifestfilewc}" -eq "0" ]; then
 	elif [ "${appmanifestfilewc}" -eq "0" ]; then
 		if [ "${forceupdate}" == "1" ]; then
 		if [ "${forceupdate}" == "1" ]; then
 			fn_print_fail "Still no appmanifest_${appid}.acf found: Unable to update"
 			fn_print_fail "Still no appmanifest_${appid}.acf found: Unable to update"
-			fn_script_log "Warning! Still no appmanifest_${appid}.acf found: Unable to update"
-			exit 1
+			fn_script_log_fatal "Still no appmanifest_${appid}.acf found: Unable to update"
+			core_exit.sh
 		fi
 		fi
 		forceupdate=1
 		forceupdate=1
 		fn_print_warn "No appmanifest_${appid}.acf found"
 		fn_print_warn "No appmanifest_${appid}.acf found"
-		fn_script_log "Warning! No appmanifest_${appid}.acf found"
+		fn_script_log_warn "No appmanifest_${appid}.acf found"
 		sleep 2
 		sleep 2
 		fn_print_info_nl "Forcing update to correct issue"
 		fn_print_info_nl "Forcing update to correct issue"
-		fn_script_log "Forcing update to correct issue"
+		fn_script_log_warn "Forcing update to correct issue"
 		sleep 1
 		sleep 1
 		update_dl.sh
 		update_dl.sh
 		update_check.sh
 		update_check.sh
@@ -74,7 +74,7 @@ fn_appmanifestcheck(){
 fn_logupdaterequest(){
 fn_logupdaterequest(){
 	# Checks for server update requests from server logs.
 	# Checks for server update requests from server logs.
 	fn_print_dots "Checking for update: Server logs"
 	fn_print_dots "Checking for update: Server logs"
-	fn_script_log "Checking for update: Server logs"
+	fn_script_log_info "Checking for update: Server logs"
 	sleep 1
 	sleep 1
 	requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
 	requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
 	if [ "${requestrestart}" -ge "1" ]; then
 	if [ "${requestrestart}" -ge "1" ]; then
@@ -110,7 +110,7 @@ fn_steamcmdcheck(){
 	fn_appmanifestcheck
 	fn_appmanifestcheck
 	# Checks for server update from SteamCMD
 	# Checks for server update from SteamCMD
 	fn_print_dots "Checking for update: SteamCMD"
 	fn_print_dots "Checking for update: SteamCMD"
-	fn_script_log "Checking for update: SteamCMD"
+	fn_script_log_info "Checking for update: SteamCMD"
 	sleep 1
 	sleep 1
 
 
 	# Gets currentbuild
 	# Gets currentbuild
@@ -135,14 +135,14 @@ fn_steamcmdcheck(){
 	availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"${branchname}\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
 	availablebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +app_info_print "${appid}" +quit | grep -EA 1000 "^\s+\"branches\"$" | grep -EA 5 "^\s+\"${branchname}\"$" | grep -m 1 -EB 10 "^\s+}$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\  -f3)
 	if [ -z "${availablebuild}" ]; then
 	if [ -z "${availablebuild}" ]; then
 		fn_print_fail "Checking for update: SteamCMD"
 		fn_print_fail "Checking for update: SteamCMD"
-		fn_script_log "Failure! Checking for update: SteamCMD"
+		fn_script_log_fatal "Checking for update: SteamCMD"
 		sleep 1
 		sleep 1
 		fn_print_fail_nl "Checking for update: SteamCMD: Not returning version info"
 		fn_print_fail_nl "Checking for update: SteamCMD: Not returning version info"
-		fn_script_log "Failure! Checking for update: SteamCMD: Not returning version info"
-		exit 1
+		fn_script_log_fatal "Checking for update: SteamCMD: Not returning version info"
+		core_exit.sh
 	else
 	else
 		fn_print_ok "Checking for update: SteamCMD"
 		fn_print_ok "Checking for update: SteamCMD"
-		fn_script_log "Success! Checking for update: SteamCMD"
+		fn_script_log_pass "Checking for update: SteamCMD"
 		sleep 1
 		sleep 1
 	fi
 	fi
 
 
@@ -197,7 +197,7 @@ fn_steamcmdcheck(){
 fn_teamspeak3_check(){
 fn_teamspeak3_check(){
 	# Checks for server update from teamspeak.com using a mirror dl.4players.de
 	# Checks for server update from teamspeak.com using a mirror dl.4players.de
 	fn_print_dots "Checking for update: teamspeak.com"
 	fn_print_dots "Checking for update: teamspeak.com"
-	fn_script_log "Checking for update: teamspeak.com"
+	fn_script_log_info "Checking for update: teamspeak.com"
 	sleep 1
 	sleep 1
 
 
 	# Gets currentbuild info
 	# Gets currentbuild info
@@ -206,10 +206,10 @@ fn_teamspeak3_check(){
 		fn_print_fail "Checking for update: teamspeak.com"
 		fn_print_fail "Checking for update: teamspeak.com"
 		sleep 1
 		sleep 1
 		fn_print_fail_nl "Checking for update: teamspeak.com: No logs with server version found"
 		fn_print_fail_nl "Checking for update: teamspeak.com: No logs with server version found"
-		fn_script_log "Failure! Checking for update: teamspeak.com: No logs with server version found"
+		fn_script_log_error "Checking for update: teamspeak.com: No logs with server version found"
 		sleep 2
 		sleep 2
 		fn_print_info_nl "Checking for update: teamspeak.com: Forcing server restart"
 		fn_print_info_nl "Checking for update: teamspeak.com: Forcing server restart"
-		fn_script_log "Checking for update: teamspeak.com: Forcing server restart"
+		fn_script_log_info "Checking for update: teamspeak.com: Forcing server restart"
 		sleep 2
 		sleep 2
 		command_stop.sh
 		command_stop.sh
 		command_start.sh
 		command_start.sh
@@ -217,8 +217,10 @@ fn_teamspeak3_check(){
 		# If still failing will exit
 		# If still failing will exit
 		if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
 		if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
 			fn_print_fail_nl "Checking for update: teamspeak.com: Still No logs with server version found"
 			fn_print_fail_nl "Checking for update: teamspeak.com: Still No logs with server version found"
-			fn_script_log "Failure! Checking for update: teamspeak.com: Still No logs with server version found"
-			exit 1
+			fn_script_log_fatal "Checking for update: teamspeak.com: Still No logs with server version found"
+			core_exit.sh
+		else
+			exitcode=0
 		fi
 		fi
 	fi
 	fi
 	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
 	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
@@ -260,15 +262,14 @@ fn_teamspeak3_check(){
 	# Checks availablebuild info is available
 	# Checks availablebuild info is available
 	if [ -z "${availablebuild}" ]; then
 	if [ -z "${availablebuild}" ]; then
 		fn_print_fail "Checking for update: teamspeak.com"
 		fn_print_fail "Checking for update: teamspeak.com"
-		fn_script_log "Checking for update: teamspeak.com"
 		sleep 1
 		sleep 1
 		fn_print_fail "Checking for update: teamspeak.com: Not returning version info"
 		fn_print_fail "Checking for update: teamspeak.com: Not returning version info"
-		fn_script_log "Failure! Checking for update: teamspeak.com: Not returning version info"
-		sleep 2
-		exit 1
+		fn_script_log_fatal "Failure! Checking for update: teamspeak.com: Not returning version info"
+		sleep 1
+		core_exit.sh
 	else
 	else
 		fn_print_ok "Checking for update: teamspeak.com"
 		fn_print_ok "Checking for update: teamspeak.com"
-		fn_script_log "Success! Checking for update: teamspeak.com"
+		fn_script_log_pass "Checking for update: teamspeak.com"
 		sleep 1
 		sleep 1
 	fi
 	fi
 
 

+ 6 - 6
lgsm/functions/update_steamcmd.sh

@@ -75,15 +75,15 @@ fn_appmanifest_check(){
 	elif [ "${appmanifestfilewc}" -eq "0" ]; then
 	elif [ "${appmanifestfilewc}" -eq "0" ]; then
 		if [ "${forceupdate}" == "1" ]; then
 		if [ "${forceupdate}" == "1" ]; then
 			fn_print_fail "Still no appmanifest_${appid}.acf found: Unable to update"
 			fn_print_fail "Still no appmanifest_${appid}.acf found: Unable to update"
-			fn_script_log "Warning! Still no appmanifest_${appid}.acf found: Unable to update"
-			exit 1
+			fn_script_log_fatal "Warning! Still no appmanifest_${appid}.acf found: Unable to update"
+			core_exit.sh
 		fi
 		fi
 		forceupdate=1
 		forceupdate=1
 		fn_print_warn "No appmanifest_${appid}.acf found"
 		fn_print_warn "No appmanifest_${appid}.acf found"
-		fn_script_log "Warning! No appmanifest_${appid}.acf found"
-		sleep 2
+		fn_script_log_warn "No appmanifest_${appid}.acf found"
+		sleep 1
 		fn_print_info_nl "Forcing update to correct issue"
 		fn_print_info_nl "Forcing update to correct issue"
-		fn_script_log "Forcing update to correct issue"
+		fn_script_log_info "Forcing update to correct issue"
 		sleep 1
 		sleep 1
 		update_dl.sh
 		update_dl.sh
 		update_check.sh
 		update_check.sh
@@ -93,7 +93,7 @@ fn_appmanifest_check(){
 fn_update_request_log(){
 fn_update_request_log(){
 	# Checks for server update requests from server logs.
 	# Checks for server update requests from server logs.
 	fn_print_dots "Checking for update: Server logs"
 	fn_print_dots "Checking for update: Server logs"
-	fn_script_log "Checking for update: Server logs"
+	fn_script_log_info "Checking for update: Server logs"
 	sleep 1
 	sleep 1
 	requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
 	requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
 	if [ "${requestrestart}" -ge "1" ]; then
 	if [ "${requestrestart}" -ge "1" ]; then