Browse Source

Fixing issue #1425

pull/1657/head
Daniel Gibbs 8 years ago
parent
commit
eb7d8907b6
  1. 2
      lgsm/functions/logs.sh
  2. 2
      lgsm/functions/update_steamcmd.sh
  3. 6
      linuxgsm.sh

2
lgsm/functions/logs.sh

@ -67,7 +67,7 @@ if [ $(find "${lgsmlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; then
smcount=$(find "${commonlogs}"/ -type f -mtime +"${logdays}"|wc -l) smcount=$(find "${commonlogs}"/ -type f -mtime +"${logdays}"|wc -l)
find "${commonlogs}"/ -mtime +"${logdays}" -type f -exec rm -f {} \; find "${commonlogs}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
fi fi
if [ -d ${commonsourcelogs} ]; then if [ -d "${commonsourcelogs}" ]; then
find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"| tee >> "${lgsmlog}" find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"| tee >> "${lgsmlog}"
smcount=$(find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"|wc -l) smcount=$(find "${commonsourcelogs}"/* -type f -mtime +"${logdays}"|wc -l)
find "${commonsourcelogs}"/* -mtime +"${logdays}" -type f -exec rm -f {} \; find "${commonsourcelogs}"/* -mtime +"${logdays}" -type f -exec rm -f {} \;

2
lgsm/functions/update_steamcmd.sh

@ -102,7 +102,7 @@ fn_update_request_log(){
fn_print_dots "Checking for update: Server logs" fn_print_dots "Checking for update: Server logs"
fn_script_log_info "Checking for update: Server logs" fn_script_log_info "Checking for update: Server logs"
sleep 1 sleep 1
if [ -f ${consolelog} ]; then if [ -f "${consolelog}" ]; then
requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}") requestrestart=$(grep -Ec "MasterRequestRestart" "${consolelog}")
else else
requestrestart="0" requestrestart="0"

6
linuxgsm.sh

@ -23,8 +23,8 @@ fi
version="170926" version="170926"
shortname="core" shortname="core"
gameservername="core" gameservername="core"
rootdir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
servicename="${selfname}" servicename="${selfname}"
lockselfname=".${servicename}.lock" lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm" lgsmdir="${rootdir}/lgsm"
@ -337,7 +337,7 @@ else
echo -e "\e[0;32mOK\e[0m" echo -e "\e[0;32mOK\e[0m"
fi fi
else else
function_file_diff=$(diff -q ${configdirdefault}/config-lgsm/${gameservername}/_default.cfg ${configdirserver}/_default.cfg) function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
if [ "${function_file_diff}" != "" ]; then if [ "${function_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has been altered. reloading config." fn_print_warn_nl "_default.cfg has been altered. reloading config."
echo -ne " copying _default.cfg...\c" echo -ne " copying _default.cfg...\c"

Loading…
Cancel
Save