Browse Source

Reverting commit, no requirement to bypass this.

Rather than get no output mkdir message states that the directory already exists. This looks better than having nothing at all.
Daniel Gibbs 9 years ago
parent
commit
4155af5d60
1 changed files with 7 additions and 19 deletions
  1. 7 19
      lgsm/functions/install_logs.sh

+ 7 - 19
lgsm/functions/install_logs.sh

@@ -15,22 +15,12 @@ if [ "${checklogs}" != "1" ]; then
 fi
 sleep 1
 # Create dir's for the script and console logs
-if [ ! -d "${rootdir}/log" ]; then
-	mkdir -v "${rootdir}/log"
-fi
-if [ ! -d "${scriptlogdir}" ]; then
-	mkdir -v "${scriptlogdir}"
-fi
-if [ ! -f "${scriptlog}" ]; then
-	touch "${scriptlog}"
-fi
+mkdir -v "${rootdir}/log"
+mkdir -v "${scriptlogdir}"
+touch "${scriptlog}"
 if [ -n "${consolelogdir}" ]; then
-	if [ ! -d "${consolelogdir}" ]; then
-		mkdir -v "${consolelogdir}"
-	fi
-	if [ ! -f "${consolelog}" ]; then
-		touch "${consolelog}"
-	fi
+	mkdir -v "${consolelogdir}"
+	touch "${consolelog}"
 fi
 
 # If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
@@ -42,9 +32,7 @@ fi
 
 # If a server is unreal2 or unity3d create a dir.
 if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then
-	if [ ! -d "${gamelogdir}" ]; then
-		mkdir -pv "${gamelogdir}"
-	fi
+	mkdir -pv "${gamelogdir}"
 fi
 
 # If server uses SteamCMD create a symbolic link to the Steam logs.
@@ -54,4 +42,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then
 	fi
 fi
 sleep 1
-fn_script_log_info "Logs installed"
+fn_script_log_info "Logs installed"