From 386cd4878c8972aaa862596c5fea85e483134190 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Wed, 30 Jul 2025 13:54:42 -0600 Subject: [PATCH] Add support for displaying which mods are active in the server container when listing the installed mods. --- files/bin/dz-common | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/bin/dz-common b/files/bin/dz-common index d6f56fe..1e53d17 100755 --- a/files/bin/dz-common +++ b/files/bin/dz-common @@ -73,10 +73,9 @@ prompt_yn(){ fi } -# List mods +# List mods. Highlight the ones that are active when run from the server script. list(){ X=1 - C="${green}" spaces=" " FIRST=1 for link in $(ls -d ${SERVER_FILES}/@* 2> /dev/null | sort) @@ -91,6 +90,11 @@ list(){ ID=$(readlink ${link} | awk -F/ '{print $NF}') MODNAME=$(get_mod_name ${ID}) SIZE=$(du -sh "${WORKSHOP_DIR}/${ID}" | awk '{print $1}') + C="${yellow}" + if [[ -L ${SERVER_PROFILE}/@${MODNAME} ]] + then + C="${green}" + fi printf "${C}%.3d %s %.30s %s https://steamcommunity.com/sharedfiles/filedetails/?id=%s %s${default}\n" ${X} ${ID} "${MODNAME}" "${spaces:${#MODNAME}}" ${ID} ${SIZE} X=$((X+1)) done