[etherpad-web/oscp-frontend] Different way of dinamically copying htaccess passwords from env variables into htaccess files withi
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [etherpad-web/oscp-frontend] Different way of dinamically copying htaccess passwords from env variables into htaccess files withi
- Date: Wed, 19 Dec 2018 01:04:57 +0000 (UTC)
commit 8fb23f644c73b8aeba73d78c0ef2e6cc211845a4
Author: Andrea Veri <averi redhat com>
Date: Wed Dec 19 02:04:46 2018 +0100
Different way of dinamically copying htaccess passwords from env variables into htaccess files within the
container
app_data/httpd-pre-init/set-htaccess-passwords.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/app_data/httpd-pre-init/set-htaccess-passwords.sh
b/app_data/httpd-pre-init/set-htaccess-passwords.sh
index c715cdb..18d5ed0 100755
--- a/app_data/httpd-pre-init/set-htaccess-passwords.sh
+++ b/app_data/httpd-pre-init/set-htaccess-passwords.sh
@@ -5,5 +5,8 @@ PROTECTED_PADS=('adboard' 'board' 'codeofconduct' 'edsearch' 'marketing' 'releas
for pad_name in "${PROTECTED_PADS[@]}"; do
echo "${pad_name}:${pad_name}_to_replace" > $APP_ROOT/$pad_name.htaccess
- sed -i "s/${pad_name}_to_replace/${pad_name}/" $APP_ROOT/$pad_name.htaccess
+ if [[ `env | grep ^$pad_name | grep SECRET | cut -d'=' -f1 | cut -d'_' -f1` == "$pad_name" ]]; then
+ secret=`env | grep ^$pad_name | grep SECRET | cut -d'=' -f2`
+ sed -i "s|${pad_name}_to_replace|${secret}|" $APP_ROOT/$pad_name.htaccess
+ fi
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]