fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found"
fn_print_fail_nl "Checking for update: linux.mtasa.com: Still No logs with server version found"
fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found"
fn_script_log_fatal "Checking for update: linux.mtasa.com: Still No logs with server version found"
core_exit.sh
core_exit.sh
fi
fi
fi
fi
# Get current build from logs
# Get current build from logs
currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v"'{print $2}'"${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}')
currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v"| awk '{ print $7 }'| sed -r 's/^.{1}//'| tail -1)
if[ -z "${currentbuild}"];then
if[ -z "${currentbuild}"];then
fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found"
fn_print_error_nl "Checking for update: linux.mtasa.com: Current build version not found"
fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found"
fn_script_log_error "Checking for update: linux.mtasa.com: Current build version not found"
sleep 1
sleep 1
fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart"
fn_print_info_nl "Checking for update: linux.mtasa.com: Forcing server restart"
fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart"
fn_script_log_info "Checking for update: linux.mtasa.com: Forcing server restart"
exitbypass=1
exitbypass=1
command_stop.sh
command_stop.sh
exitbypass=1
exitbypass=1
command_start.sh
command_start.sh
currentbuild=$(awk -F"= Multi Theft Auto: San Andreas v"'{print $2}'"${consolelogdir}"/"${servicename}"-console.log | awk '{print $1}')
currentbuild=$(cat "${gamelogdir}"/server.log | grep "= Multi Theft Auto: San Andreas v"| awk '{ print $7 }'| sed -r 's/^.{1}//'| tail -1)
if[ -z "${currentbuild}"];then
if[ -z "${currentbuild}"];then
fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found"
fn_print_fail_nl "Checking for update: linux.mtasa.com: Current build version still not found"
fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found"
fn_script_log_fatal "Checking for update: linux.mtasa.com: Current build version still not found"
core_exit.sh
core_exit.sh
fi
fi
fi
fi
}
}
fn_mta_get_availablebuild()
fn_mta_get_availablebuild()
{
{
fn_fetch_file "https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h""${tmpdir}""version.h"# we need to find latest stable version here
fn_fetch_file "https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h""${tmpdir}""version.h"# we need to find latest stable version here