diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2020-10-19 15:13:32 +0200 |
---|---|---|
committer | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2020-10-20 13:08:43 +0200 |
commit | 244b71f5c63c020cd680d01f9c6eb7eb9c7c76b4 (patch) | |
tree | 4d317e3fed8fb6ef4a8e2ad0ae87f4f5f4387da0 /installation/sdnc-web/src/main/scripts | |
parent | 6e235804408b4c0615a09c8e0064c8c3f50c1e44 (diff) |
Fix error caused by empty env TOPOURL
container in crashloop back due to empty env TOPOURL
Issue-ID: SDNC-1385
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: Id5d106caee7fcb78ee9fce390521dad056debca4
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Former-commit-id: eeca2684f61b9f88bea49ca2fbfd5e597b139426
Diffstat (limited to 'installation/sdnc-web/src/main/scripts')
-rw-r--r-- | installation/sdnc-web/src/main/scripts/configure.sh | 3 | ||||
-rw-r--r-- | installation/sdnc-web/src/main/scripts/run.sh | 27 |
2 files changed, 17 insertions, 13 deletions
diff --git a/installation/sdnc-web/src/main/scripts/configure.sh b/installation/sdnc-web/src/main/scripts/configure.sh index 2a007672..cf53a0d9 100644 --- a/installation/sdnc-web/src/main/scripts/configure.sh +++ b/installation/sdnc-web/src/main/scripts/configure.sh @@ -59,6 +59,7 @@ update_nginx_site_conf() { sed -i 's|SDNRPROTOCOL|'$SDNRPROTOCOL'|g' $FN sed -i 's|SDNRHOST|'$SDNRHOST'|g' $FN sed -i 's|SDNRPORT|'$SDNRPORT'|g' $FN + sed -i 's|DNS_RESOLVER|'$DNS_RESOLVER'|g' $FN # handle optional parameters if [ -z "$TRPCEURL" ]; then @@ -70,7 +71,7 @@ update_nginx_site_conf() { fi if [ -z "$TOPOURL" ]; then echo "topology api forwarding disabled" - sed -i 's|proxy_pass TOPOURL/$1;|return 404;|g' $FN + sed -i 's|proxy_pass TOPOURL;|return 404;|g' $FN else sed -i 's|TOPOURL|'$TOPOURL'|g' $FN fi diff --git a/installation/sdnc-web/src/main/scripts/run.sh b/installation/sdnc-web/src/main/scripts/run.sh index 9d912a65..c310837f 100644 --- a/installation/sdnc-web/src/main/scripts/run.sh +++ b/installation/sdnc-web/src/main/scripts/run.sh @@ -30,21 +30,24 @@ echo " WEBPORT : $WEBPORT" echo " SDNRPROTOCOL : $SDNRPROTOCOL" echo " SDNRHOST : $SDNRHOST" echo " SDNRPORT : $SDNRPORT" +echo " DNS_RESOLVER : $DNS_RESOLVER" echo " TRPCEURL : $TRPCEURL" echo " TOPOURL : $TOPOURL" echo " TILEURL : $TILEURL" -echo " SSL_CERT_DIR : $SSL_CERT_DIR" -echo -n " SSL_CERTIFICATE: $SSL_CERTIFICATE" -if [ -f "$SSL_CERTIFICATE" ]; then -echo " (exists)" -else -echo " (missing)" -fi -echo -n " SSL_CERTIFICATE_KEY: $SSL_CERTIFICATE_KEY" -if [ -f "$SSL_CERTIFICATE_KEY" ]; then -echo " (exists)" -else -echo " (missing)" +if [ "$WEBPROTOCOL" == "HTTPS" ]; then + echo " SSL_CERT_DIR : $SSL_CERT_DIR" + echo -n " SSL_CERTIFICATE: $SSL_CERTIFICATE" + if [ -f "$SSL_CERT_DIR/$SSL_CERTIFICATE" ]; then + echo " (exists)" + else + echo " (missing)" + fi + echo -n " SSL_CERTIFICATE_KEY: $SSL_CERTIFICATE_KEY" + if [ -f "$SSL_CERT_DIR/$SSL_CERTIFICATE_KEY" ]; then + echo " (exists)" + else + echo " (missing)" + fi fi echo "" |