Browse Source

Checks if "log" folder already exists

Checks if the log folder already exists and just displays a warning message, otherwise it creates the folders
pull/854/head^2
Scott Smith 9 years ago
parent
commit
515c8b7213
  1. 4
      functions/fn_install_logs

4
functions/fn_install_logs

@ -11,6 +11,9 @@ if [ "${checklogs}" != "1" ]; then
fi
sleep 1
# Create dir's for the script and console logs
if [ -d "${rootdir}/log" ]; then
fn_print_warning_nl "Log folders already exist!"
else
mkdir -v "${rootdir}/log"
mkdir -v "${scriptlogdir}"
touch "${scriptlog}"
@ -18,6 +21,7 @@ if [ -n "${consolelogdir}" ]; then
mkdir -v "${consolelogdir}"
touch "${consolelog}"
fi
fi
# If a server is source or goldsource, Teamspeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]||[ "${gamename}" == "Teamspeak 3" ]||[ "${engine}" == "starbound" ]||[ "${engine}" == "projectzomboid" ]; then

Loading…
Cancel
Save