|
@@ -37,18 +37,18 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
|
|
|
echo -en "\n"
|
|
echo -en "\n"
|
|
|
# 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}"
|
|
|
scriptcount=$(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
scriptcount=$(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${scriptlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${scriptlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
# SRCDS and unreal logfiles
|
|
# SRCDS and unreal logfiles
|
|
|
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
|
|
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "source" ]; then
|
|
|
- find "${gamelogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${gamelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
gamecount=$(find "${gamelogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${gamelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
fi
|
|
fi
|
|
|
# Console logfiles
|
|
# Console logfiles
|
|
|
if [ -n "${consolelog}" ]; then
|
|
if [ -n "${consolelog}" ]; then
|
|
|
- find "${consolelogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${consolelogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
consolecount=$(find "${consolelogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
consolecount=$(find "${consolelogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${consolelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${consolelogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
fi
|
|
fi
|
|
@@ -56,7 +56,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
|
|
|
if [ "${engine}" == "source" ]; then
|
|
if [ "${engine}" == "source" ]; then
|
|
|
# SourceMod logfiles
|
|
# SourceMod logfiles
|
|
|
if [ -d "${sourcemodlogdir}" ]; then
|
|
if [ -d "${sourcemodlogdir}" ]; then
|
|
|
- find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
smcount=$(find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
smcount=$(find "${sourcemodlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${sourcemodlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${sourcemodlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
fi
|
|
fi
|
|
@@ -64,13 +64,13 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
|
|
|
if [ "${gamename}" == "Garry's Mod" ]; then
|
|
if [ "${gamename}" == "Garry's Mod" ]; then
|
|
|
# ULX logfiles
|
|
# ULX logfiles
|
|
|
if [ -d "${ulxlogdir}" ]; then
|
|
if [ -d "${ulxlogdir}" ]; then
|
|
|
- find "${ulxlogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${ulxlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
ulxcount=$(find "${ulxlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
ulxcount=$(find "${ulxlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${ulxlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${ulxlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
fi
|
|
fi
|
|
|
# DarkRP logfiles
|
|
# DarkRP logfiles
|
|
|
if [ -d "${darkrplogdir}" ]; then
|
|
if [ -d "${darkrplogdir}" ]; then
|
|
|
- find "${darkrplogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${darkrplogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
darkrpcount=$(find "${darkrplogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
darkrpcount=$(find "${darkrplogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${darkrplogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${darkrplogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
fi
|
|
fi
|
|
@@ -78,7 +78,7 @@ if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; th
|
|
|
fi
|
|
fi
|
|
|
# Legacy support
|
|
# Legacy support
|
|
|
if [ -d "${legacyserverlogdir}" ]; then
|
|
if [ -d "${legacyserverlogdir}" ]; then
|
|
|
- find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|tee >> "${scriptlog}"
|
|
|
|
|
|
|
+ find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"| tee >> "${scriptlog}"
|
|
|
legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
legacycount=$(find "${legacyserverlogdir}"/ -type f -mtime +"${logdays}"|wc -l)
|
|
|
find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
find "${legacyserverlogdir}"/ -mtime +"${logdays}" -type f -exec rm -f {} \;
|
|
|
# Remove folder if empty
|
|
# Remove folder if empty
|