From 17b0efd264023903d083538514bdf8f37e4a5904 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 27 Sep 2023 11:20:39 +0100 Subject: [PATCH] feat: improve log directory creation - Updated log directory creation to include italic formatting for directory names. - Added italic formatting for script log, console log, game log, and steam log directories. - Improved serverfiles directory creation by including italic formatting for the directory name. --- lgsm/modules/install_logs.sh | 16 ++++++++-------- lgsm/modules/install_server_dir.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh index e686e4c74b..0abc08f6a9 100644 --- a/lgsm/modules/install_logs.sh +++ b/lgsm/modules/install_logs.sh @@ -14,7 +14,7 @@ if [ -z "${checklogs}" ]; then fn_sleep_time fi -echo -en "creating log directory [ ${logdir} ]" +echo -en "creating log directory [ ${italic}${logdir}${default} ]" if [ ! -d "${logdir}" ]; then if ! mkdir -p "${logdir}"; then fn_print_fail_eol_nl @@ -26,7 +26,7 @@ else fn_print_skip_eol_nl fi -echo -en "creating script log directory [ ${lgsmlogdir} ]" +echo -en "creating script log directory [ ${italic}${lgsmlogdir}${default} ]" if [ ! -d "${lgsmlogdir}" ]; then if ! mkdir -p "${lgsmlogdir}"; then fn_print_fail_eol_nl @@ -38,7 +38,7 @@ else fn_print_skip_eol_nl fi -echo -en "creating script log [ ${lgsmlog} ]" +echo -en "creating script log [ ${italic}${lgsmlog}${default} ]" if [ ! -f "${lgsmlog}" ]; then if ! touch "${lgsmlog}"; then fn_print_fail_eol_nl @@ -50,7 +50,7 @@ else fn_print_skip_eol_nl fi -echo -en "creating console log directory [ ${consolelogdir} ]" +echo -en "creating console log directory [ ${italic}${consolelogdir}${default} ]" if [ ! -d "${consolelogdir}" ]; then if ! mkdir -p "${consolelogdir}"; then fn_print_fail_eol_nl @@ -62,7 +62,7 @@ else fn_print_skip_eol_nl fi -echo -en "creating console log [ ${consolelog} ]" +echo -en "creating console log [ ${italic}${consolelog}${default} ]" if [ ! -f "${consolelog}" ]; then if ! touch "${consolelog}"; then fn_print_fail_eol_nl @@ -75,7 +75,7 @@ else fi if [ -n "${gamelogdir}" ]; then - echo -en "creating game log directory [ ${gamelogdir} ]" + echo -en "creating game log directory [ ${italic}${gamelogdir}${default} ]" if [ ! -d "${gamelogdir}" ]; then if ! mkdir -p "${gamelogdir}"; then fn_print_fail_eol_nl @@ -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 [ ${italic}${logdir}/server -> ${gamelogdir}${default} ]" # 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 [ ${italic}${logdir}/steam -> ${HOME}/.steam/steam/logs${default} ]" if [ ! -L "${logdir}/steam" ]; then if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then fn_print_fail_eol_nl diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh index 1c1a75b38b..2a9501fa6e 100644 --- a/lgsm/modules/install_server_dir.sh +++ b/lgsm/modules/install_server_dir.sh @@ -11,7 +11,7 @@ echo -e "" echo -e "${bold}${lightyellow}Server Directory${default}" echo -e "${bold}=================================${default}" fn_sleep_time -echo -en "creating serverfiles directory [ ${serverfiles} ]" +echo -en "creating serverfiles directory [ ${italic}${serverfiles}${default} ]" if [ -d "${serverfiles}" ]; then fn_print_skip_eol_nl