| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #!/bin/bash
- # LGSM command_validate.sh function
- # Author: Daniel Gibbs
- # Website: http://gameservermanagers.com
- lgsm_version="201215"
- # Description: Runs a server validation.
- local modulename="Validate"
- fn_validation(){
- check_steamcmd.sh
- check_steamuser.sh
- fn_printwarn "Validating may overwrite some customised files."
- sleep 1
- echo -en "\n"
- echo -en "https://developer.valvesoftware.com/wiki/SteamCMD#Validate"
- sleep 5
- echo -en "\n"
- fn_printdots "Checking server files"
- sleep 1
- fn_printok "Checking server files"
- fn_scriptlog "Checking server files"
- sleep 1
- cd "${rootdir}/steamcmd"
- if [ $(command -v unbuffer) ]; then
- unbuffer=unbuffer
- fi
- if [ "${engine}" == "goldsource" ]; then
- ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}"
- else
- ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" validate +quit|tee -a "${scriptlog}"
- fi
- if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
- echo -e '\n'
- fix_csgo.sh
- fi
- fn_scriptlog "Checking complete"
- }
- fn_check_root
- fn_check_systemdir
- tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
- if [ "${tmuxwc}" -eq 1 ]; then
- command_stop.sh
- fn_validation
- command_start.sh
- else
- fn_validation
- fi
|