瀏覽代碼

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 年之前
父節點
當前提交
4155af5d60
共有 1 個文件被更改,包括 7 次插入19 次删除
  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"