From 4155af5d60939f69ee6cfebcbae0dbe55ff22d52 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 19 Feb 2017 12:42:02 +0000 Subject: [PATCH] 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. --- lgsm/functions/install_logs.sh | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 3f6020e45..2019fdb13 100644 --- a/lgsm/functions/install_logs.sh +++ b/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" \ No newline at end of file