Browse Source

Checks if "log" folder already exists

If the folder does exist, just displays a warning to the user. Otherwise, it creates the folders.

This just removes the standard bash error message from the user
pull/855/head
Scott Smith 9 years ago
parent
commit
3ce77a5b53
  1. 16
      lgsm/functions/install_logs.sh

16
lgsm/functions/install_logs.sh

@ -13,12 +13,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 "${consolelogdir}" mkdir -v "${scriptlogdir}"
touch "${consolelog}" touch "${scriptlog}"
if [ -n "${consolelogdir}" ]; then
mkdir -v "${consolelogdir}"
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