|
@@ -2,7 +2,7 @@
|
|
|
# LGSM fn_check_logs function
|
|
# LGSM fn_check_logs function
|
|
|
# Author: Daniel Gibbs
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://danielgibbs.co.uk
|
|
# Website: http://danielgibbs.co.uk
|
|
|
-# Version: 230215
|
|
|
|
|
|
|
+# Version: 160415
|
|
|
# Description: Checks that log files exist on server start
|
|
# Description: Checks that log files exist on server start
|
|
|
|
|
|
|
|
# Create dir's for the script and console logs
|
|
# Create dir's for the script and console logs
|
|
@@ -17,6 +17,12 @@ if [ ! -f "${scriptlog}" ]; then
|
|
|
touch "${scriptlog}"
|
|
touch "${scriptlog}"
|
|
|
mkdir -v "${consolelogdir}"
|
|
mkdir -v "${consolelogdir}"
|
|
|
touch "${consolelog}"
|
|
touch "${consolelog}"
|
|
|
|
|
+
|
|
|
|
|
+ # If a server is Project Zomboid create a symbolic link to the game server logs
|
|
|
|
|
+ if [ "${engine}" == "projectzomboid" ]; then
|
|
|
|
|
+ ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
# If a server is source or goldsource create a symbolic link to the game server logs
|
|
# If a server is source or goldsource create a symbolic link to the game server logs
|
|
|
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
|
|
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
|
|
|
if [ ! -h "${rootdir}/log/server" ]; then
|
|
if [ ! -h "${rootdir}/log/server" ]; then
|
|
@@ -25,6 +31,7 @@ if [ ! -f "${scriptlog}" ]; then
|
|
|
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
|
|
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
+
|
|
|
# If a server is unreal2 or unity3d create a dir
|
|
# If a server is unreal2 or unity3d create a dir
|
|
|
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
|
|
if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
|
|
|
mkdir -pv "${gamelogdir}"
|
|
mkdir -pv "${gamelogdir}"
|
|
@@ -34,6 +41,7 @@ if [ ! -f "${scriptlog}" ]; then
|
|
|
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
|
|
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
+
|
|
|
# If a server is starbound create a symbolic link to the game server logs
|
|
# If a server is starbound create a symbolic link to the game server logs
|
|
|
if [ "${engine}" == "starbound" ]; then
|
|
if [ "${engine}" == "starbound" ]; then
|
|
|
if [ ! -h "${rootdir}/log/server" ]; then
|
|
if [ ! -h "${rootdir}/log/server" ]; then
|
|
@@ -42,6 +50,7 @@ if [ ! -f "${scriptlog}" ]; then
|
|
|
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
|
|
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
|
|
+
|
|
|
# If server uses SteamCMD create a symbolic link to the Steam logs
|
|
# If server uses SteamCMD create a symbolic link to the Steam logs
|
|
|
if [ -d "${rootdir}/Steam/logs" ]; then
|
|
if [ -d "${rootdir}/Steam/logs" ]; then
|
|
|
if [ ! -h "${rootdir}/log/steamcmd" ]; then
|
|
if [ ! -h "${rootdir}/log/steamcmd" ]; then
|