1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

double-double-quote vars in echo for safety etc

This commit is contained in:
holta 2019-10-24 21:44:07 -04:00 committed by Jerry Vonau
parent 38fd86ac90
commit ef0ab50bd7
2 changed files with 10 additions and 11 deletions

View file

@ -7,7 +7,7 @@ IIAB_STATE_FILE=/etc/iiab/iiab_state.yml
IIAB_ENV_FILE=/etc/iiab/iiab.env
if [ ! -f $PLAYBOOK ]; then
echo -e "\nExiting: IIAB Playbook $PLAYBOOK not found."
echo -e "\nEXITING: IIAB Playbook ""$PLAYBOOK"" not found."
echo -e "\nPlease run this in /opt/iiab/iiab (top level of the git repo)."
exit 1
fi
@ -18,13 +18,13 @@ if [ -f $IIAB_ENV_FILE ]; then
source /etc/iiab/iiab.env
echo -e "\nExtracted STAGE=$STAGE (counter) from /etc/iiab/iiab.env"
if ! [ "$STAGE" -eq "$STAGE" ] 2> /dev/null; then
echo -e "\nEXITING: STAGE (counter) value == $STAGE is non-integer"
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is non-integer"
exit 1
elif [ "$STAGE" -lt 0 ] || [ "$STAGE" -gt 9 ]; then
echo -e "\nEXITING: STAGE (counter) value == $STAGE is out-of-range"
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"" is out-of-range"
exit 1
elif [ "$STAGE" -lt 3 ]; then
echo -e "\nEXITING: STAGE (counter) value == $STAGE"
echo -e "\nEXITING: STAGE (counter) value == ""$STAGE"
echo -e "\nIIAB Stage 3 not complete."
echo -e "\nPlease run: ./iiab-install"
exit 1
@ -43,10 +43,8 @@ else
fi
# Workaround for (web-published) images; will go away later
if grep -q sugar $IIAB_STATE_FILE; then
if ! grep -q mongodb $IIAB_STATE_FILE; then
echo "mongodb_installed: True" >> $IIAB_STATE_FILE
fi
if grep -q sugar $IIAB_STATE_FILE; && ! grep -q mongodb $IIAB_STATE_FILE; then
echo "mongodb_installed: True" >> $IIAB_STATE_FILE
fi
export ANSIBLE_LOG_PATH="$CWD/iiab-configure.log"