From 0a689212201218a3c382b32b98cf94bd1654f368 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 4 Dec 2024 16:57:25 +0100 Subject: [PATCH] Allow specifying comments for locations --- .../Common/Software/docker/services/jellyfin/main.fish | 2 +- scripts/Common/Software/docker/services/service.fish | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/Common/Software/docker/services/jellyfin/main.fish b/scripts/Common/Software/docker/services/jellyfin/main.fish index 31b1ebd7..30cc8156 100755 --- a/scripts/Common/Software/docker/services/jellyfin/main.fish +++ b/scripts/Common/Software/docker/services/jellyfin/main.fish @@ -91,7 +91,7 @@ begin printf "%s\0" \ "$_flag_name" / ( for app in $servarr - printf "%s\n" "$app" "/$app" + printf "%s\n" "$app" "/$app" "" end) \ flood "~ ^/flood.*" end diff --git a/scripts/Common/Software/docker/services/service.fish b/scripts/Common/Software/docker/services/service.fish index 366dec1d..ecc4a063 100644 --- a/scripts/Common/Software/docker/services/service.fish +++ b/scripts/Common/Software/docker/services/service.fish @@ -134,7 +134,7 @@ begin for i in (seq 1 2 (count $servers)) set -l locations (getServiceLocations $i $argv | string split0) - for j in (seq 1 2 (count $locations)) + for j in (seq 1 3 (count $locations)) set -l file (mktemp) set -l port (getRandomPort) set -l service $locations[$j] @@ -167,9 +167,15 @@ begin "server_name $domain;" \ (getExtraServerConfig $domain $argv) - for j in (seq 1 2 (count $locations)) + for j in (seq 1 3 (count $locations)) set -l service $locations[$j] set -l location $locations[(math $j + 1)] + set -l comment $locations[(math $j + 2)] + + if [ -n "$comment" ] + set -a argv --comment "$comment" + end + getServiceLocationConfig $domain $service $location $argv end