Allow specifying comments for locations
This commit is contained in:
parent
1c93d4b3f4
commit
8f09b02fc2
2 changed files with 9 additions and 3 deletions
|
@ -91,7 +91,7 @@ begin
|
||||||
printf "%s\0" \
|
printf "%s\0" \
|
||||||
"$_flag_name" / (
|
"$_flag_name" / (
|
||||||
for app in $servarr
|
for app in $servarr
|
||||||
printf "%s\n" "$app" "/$app"
|
printf "%s\n" "$app" "/$app" ""
|
||||||
end) \
|
end) \
|
||||||
flood "~ ^/flood.*"
|
flood "~ ^/flood.*"
|
||||||
end
|
end
|
||||||
|
|
|
@ -134,7 +134,7 @@ begin
|
||||||
for i in (seq 1 2 (count $servers))
|
for i in (seq 1 2 (count $servers))
|
||||||
set -l locations (getServiceLocations $i $argv | string split0)
|
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 file (mktemp)
|
||||||
set -l port (getRandomPort)
|
set -l port (getRandomPort)
|
||||||
set -l service $locations[$j]
|
set -l service $locations[$j]
|
||||||
|
@ -167,9 +167,15 @@ begin
|
||||||
"server_name $domain;" \
|
"server_name $domain;" \
|
||||||
(getExtraServerConfig $domain $argv)
|
(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 service $locations[$j]
|
||||||
set -l location $locations[(math $j + 1)]
|
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
|
getServiceLocationConfig $domain $service $location $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue