summaryrefslogtreecommitdiff
path: root/public/fs/etc/nginx/nginx-conf.sh
diff options
context:
space:
mode:
authorroot@culturestrings <root@culturestrings>2020-06-14 06:29:51 +0000
committerroot@culturestrings <root@culturestrings>2020-06-14 06:29:51 +0000
commitcc67b0cddd44756394b21b80f31e7829821babec (patch)
treea0e6a4e5ddc0209a0609641729ce36aee06dcddc /public/fs/etc/nginx/nginx-conf.sh
parent5c0c6d0d14565eab1e32f99b614fea053de39a0c (diff)
downloadculturestrings-cc67b0cddd44756394b21b80f31e7829821babec.tar.bz2
culturestrings-cc67b0cddd44756394b21b80f31e7829821babec.tar.xz
nginx: make the top-level nginx.conf site-agnostic.
Diffstat (limited to 'public/fs/etc/nginx/nginx-conf.sh')
-rwxr-xr-xpublic/fs/etc/nginx/nginx-conf.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/public/fs/etc/nginx/nginx-conf.sh b/public/fs/etc/nginx/nginx-conf.sh
new file mode 100755
index 0000000..10a88c6
--- /dev/null
+++ b/public/fs/etc/nginx/nginx-conf.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -eu
+
+hostzone="$1"
+
+cfg_script="$0"
+cfg_srcdir=$(cd -- "${cfg_script%/*}/" ; pwd -P)
+
+sed -e 's/@hostzone@/'"${hostzone}"'/g' \
+ "${cfg_srcdir}/nginx.conf.in"