66# ==============================================================================
77
88# Comment the following line to stop debugging this script
9- set -o xtrace
9+ set -o xtrace
1010# Comment the following like to stop script on failure (Fail fast)
1111# set -e
1212
@@ -22,23 +22,19 @@ source common_functions
2222
2323# ======================= Processes installation options =====================
2424while [[ ${1} ]]; do
25- case " ${1} " in
26- --password|-p)
27- if [[ -z " ${2} " || " ${2} " == -* ]]; then
28- PrintError " Missing password."
29- else
30- _PASSWORD=" ${2} "
31- fi
32- shift
33- ;;
34- --help|-h)
35- PrintHelp " Install refstack server " $( basename " $0 " ) " --password | -p Password to be used on the DB."
36- ;;
37- * )
38- HandleOptions " $@ "
39- shift
40- esac
41- shift
25+ case " ${1} " in
26+ --password|-p)
27+ [[ -z " ${2} " || " ${2} " == -* ]] && PrintError " Missing password." || _PASSWORD=" ${2} "
28+ shift
29+ ;;
30+ --help|-h)
31+ PrintHelp " Install refstack server " $( basename " $0 " ) " --password | -p Password to be used on the DB."
32+ ;;
33+ * )
34+ HandleOptions " $@ "
35+ shift
36+ esac
37+ shift
4238done
4339
4440# ==================================== Install Dependencies ===================
@@ -107,10 +103,10 @@ sed -i "s/refstack.openstack.org\/api/$fqdn:8000/g" refstack-ui/app/config.json
107103# DB SYNC IF VERSION IS None
108104source .venv/bin/activate
109105if [[ ! -z $( refstack-manage --config-file etc/refstack.conf version | grep -i none) ]]; then
110- refstack-manage --config-file etc/refstack.conf upgrade --revision head
111- # Verify upgrade actually happened
112- msg=" After sync DB, version is still displayed as None."
113- [[ ! -z $( refstack-manage --config-file etc/refstack.conf version | grep -i none) ]] && PrintError $msg
106+ refstack-manage --config-file etc/refstack.conf upgrade --revision head
107+ # Verify upgrade actually happened
108+ msg=" After sync DB, version is still displayed as None."
109+ [[ ! -z $( refstack-manage --config-file etc/refstack.conf version | grep -i none) ]] && PrintError $msg
114110fi
115111popd
116112
0 commit comments