diff --git a/iiab-install b/iiab-install index 5a3994622..15010a3bd 100755 --- a/iiab-install +++ b/iiab-install @@ -4,7 +4,7 @@ PLAYBOOK="iiab-steps.yml" INVENTORY="ansible_hosts" CWD=`pwd` # Add cmdline options for passing to ansible -# todo add proper shift to gobble up --debug --upgrade +# todo add proper shift to gobble up --debug --reinstall ARGS="" export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" @@ -16,7 +16,9 @@ cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact STAGE="" -if [ -f /etc/iiab/iiab.env ]; then +if [ ! -f /etc/iiab/iiab.env ]; then + mkdir -p /etc/iiab +else OLD=`grep XSCE /etc/iiab/iiab.env | wc -l` if [ "$OLD" != 0 ] || [ "$1" = "--reinstall" ]; then echo "Found old XSCE install - re-installing from scratch" @@ -34,13 +36,11 @@ if [ -f /etc/iiab/iiab.env ]; then # "offer 'Y' or stage number dialog box option to override" echo "'iiab-install' has already been completed" echo "use --debug to override " - echo "In demo mode not preventing second run" + #echo "In demo mode not preventing second run" #echo "Exiting." - #exit 0 + exit 1 fi fi -else - mkdir -p /etc/iiab fi if [ ! -f $PLAYBOOK ]; then