summaryrefslogtreecommitdiff
path: root/public/fs
diff options
context:
space:
mode:
authorroot@culturestrings <root@culturestrings>2020-07-13 19:35:31 +0000
committerroot@culturestrings <root@culturestrings>2020-07-13 19:43:35 +0000
commit94be224b6eb43b82c598548c02fe642f45899b2b (patch)
treed6c33c09207a548f5f4e75605288ff5a1387efa9 /public/fs
parenta75d12f964f0d3b77d041ef310c991631097ff0e (diff)
downloadculturestrings-94be224b6eb43b82c598548c02fe642f45899b2b.tar.bz2
culturestrings-94be224b6eb43b82c598548c02fe642f45899b2b.tar.xz
nginx: vhost config-file generation: obtain list of sub-folders more elegantly.
Diffstat (limited to 'public/fs')
-rwxr-xr-xpublic/fs/etc/nginx/vhosts.d/nginx-primary-subdomain-cfg.sh5
-rwxr-xr-xpublic/fs/etc/nginx/vhosts.d/nginx-primary-zone-cfg.sh6
2 files changed, 4 insertions, 7 deletions
diff --git a/public/fs/etc/nginx/vhosts.d/nginx-primary-subdomain-cfg.sh b/public/fs/etc/nginx/vhosts.d/nginx-primary-subdomain-cfg.sh
index 748360e..20a067f 100755
--- a/public/fs/etc/nginx/vhosts.d/nginx-primary-subdomain-cfg.sh
+++ b/public/fs/etc/nginx/vhosts.d/nginx-primary-subdomain-cfg.sh
@@ -4,8 +4,7 @@ set -eu
IFS=','
-sitesubd="$1"
-sitedirs="$2"
+sitesubd="$1"; shift;
sitezone="${sitesubd#*.}"
sitepref="${sitesubd%%.*}"
@@ -27,7 +26,7 @@ server {
_EOF
# indexed locations
-for sitedir in ${sitedirs}; do
+for sitedir in $@; do
cat << _EOF
location /${sitedir} {
diff --git a/public/fs/etc/nginx/vhosts.d/nginx-primary-zone-cfg.sh b/public/fs/etc/nginx/vhosts.d/nginx-primary-zone-cfg.sh
index f325fe1..986ae07 100755
--- a/public/fs/etc/nginx/vhosts.d/nginx-primary-zone-cfg.sh
+++ b/public/fs/etc/nginx/vhosts.d/nginx-primary-zone-cfg.sh
@@ -4,9 +4,7 @@ set -eu
IFS=','
-sitezone="$1"
-sitedirs="$2"
-
+sitezone="$1"; shift;
cfg_script="$0"
cfg_srcdir=$(cd -- "${cfg_script%/*}/" ; pwd -P)
@@ -25,7 +23,7 @@ server {
_EOF
# indexed locations
-for sitedir in ${sitedirs}; do
+for sitedir in $@; do
cat << _EOF
location /${sitedir} {