1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Exit w/ explanation if /opt/iiab/iiab was deleted

This commit is contained in:
A Holt 2019-10-09 19:03:32 -04:00 committed by GitHub
parent 210c5883bd
commit c92dd3ddbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,17 +55,19 @@ else
else
echo "openvpn_install: True" >> /etc/iiab/local_vars.yml
fi
#cd /opt/iiab/iiab
#./runrole 1-prep
if [ -d /opt/iiab/iiab ]; then
cd /opt/iiab/iiab
#CWD=`pwd`
#export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
# For log file, in case git tree deleted, on IIABs with very small disks:
mkdir -p /opt/iiab/iiab
export ANSIBLE_LOG_PATH="/opt/iiab/iiab/iiab-install.log"
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local
# Above is tighter/better than running all of "./runrole 1-prep"
echo
else
echo -e 'Directory /opt/iiab/iiab does not exist: CANNOT INSTALL OPENVPN!\n'
exit 1
fi
fi
echo -e "Now let's (re)enable OpenVPN...\n"