From 06a6a78d773c981a1dd0ac79b47df6a28e6ba28e Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Fri, 2 Oct 2015 11:48:30 +0000 Subject: [PATCH] Fixes on deployment --- scripts/containers/deploy.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/containers/deploy.sh b/scripts/containers/deploy.sh index 5bfea82f..81c3a8ac 100644 --- a/scripts/containers/deploy.sh +++ b/scripts/containers/deploy.sh @@ -80,17 +80,19 @@ function main () { run sudo python3 -W ignore manage.py setupnginx --user $USER run sudo python3 -W ignore manage.py restartservices run sudo python3 -W ignore manage.py startservices + run python3 -W ignore manage.py check --deploy ip_addr=$(ip addr show eth0 | grep 'inet ' | sed -r "s/.*inet ([^\s]*).*/\1/" | cut -d'/' -f1) if [[ $ip_addr == '' ]]; then ip_addr=127.0.0.1 fi - if curl https://$ip_addr/admin/ -I -k -s | grep 'HTTP/1.1 302 FOUND'; then - echo -e "${bold}Orchestra appears to be working at https://${ip_addr}/admin/${normal}\n" + echo + echo -e "${bold}Checking if Orchestra is working at https://${ip_addr}/admin/${normal} ...\n" + if [[ $(curl https://$ip_addr/admin/ -I -k -s | grep 'HTTP/1.1 302 FOUND') ]]; then + echo -e "${bold}Orchestra appears to be working!\n" else - echo -e "${bold}Err. Orchestra is not responding at https://${ip_addr}/admin/${normal}\n" >&2 + echo -e "${bold}Err. Orchestra is not responding responding at https://${ip_addr}/admin/${normal}\n" >&2 fi - run python3 -W ignore manage.py check --deploy } # Wrap it all on a function to avoid partial executions when running through wget/curl