From 9dced4da6d905579283dc3b94d41f8d984cc0842 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 27 Sep 2023 10:01:05 +0100 Subject: [PATCH] refactor: improve log directory symlink creation This commit refactors the code in `install_logs.sh` to improve the creation of symlinks for game log directories. The commit fixes a typo in the echo statement and updates the symlink paths for both game logs and Steam logs. --- lgsm/modules/install_logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index 6621c2def..e686e4c74 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -93,7 +93,7 @@ fi # e.g serverfiles/log is not within log/: symlink created # log/server is in log/: symlink not created if [ -n "${gamelogdir}" ] && [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then - echo -en "creating symlink to game log directory [ ${logdir}/server -> ${gamelogdir} )" + echo -en "creating symlink to game log directory [ ${logdir}/server -> ${gamelogdir} ]" # if path does not exist or does not match gamelogdir if [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; then if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then @@ -109,7 +109,7 @@ fi # If server uses SteamCMD create a symbolic link to the Steam logs. if [ -d "${HOME}/.steam/steam/logs" ]; then - echo -en "creating symlink to steam log directory [ ${logdir}/steam -> ${HOME}/.steam/steam/logs )" + echo -en "creating symlink to steam log directory [ ${logdir}/steam -> ${HOME}/.steam/steam/logs ]" if [ ! -L "${logdir}/steam" ]; then if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then fn_print_fail_eol_nl