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. 12
      functions/fn_install_logs

12
functions/fn_install_logs

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

Loading…
Cancel
Save