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

Cleaner /opt/iiab/iiab/runrole

This commit is contained in:
A Holt 2020-02-11 16:51:03 -05:00 committed by GitHub
parent b106183c52
commit ad740adadb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

23
runrole
View file

@ -7,6 +7,7 @@ REINSTALL=0
CWD=`pwd`
IIAB_STATE_FILE=/etc/iiab/iiab_state.yml
LOCAL_VARS_FILE=/etc/iiab/local_vars.yml
if [ ! -f $PLAYBOOK ]; then
echo "Exiting: IIAB Playbook not found."
echo "Please run this in /opt/iiab/iiab (top level of the git repo)."
@ -61,19 +62,15 @@ fi
#fi
if [ "$REINSTALL" == "1" ]; then
#if [ ! $1 == "internetarchive" ]; then # special handling
if [ $1 == "calibre-web" ]; then # role directory & installed marker differ
sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE
elif [ $1 == "httpd" ]; then # role directory & installed marker differ
sed -i -e '/^apache/d' $IIAB_STATE_FILE
elif [ $1 == "osm-vector-maps" ]; then # role directory & installed marker differ
sed -i -e '/^osm_vector_maps/d' $IIAB_STATE_FILE
#elif [ $1 == "bluetooth" ]; then # role directory & installed marker differ
# sed -i -e '/^pan_bluetooth/d' $IIAB_STATE_FILE
else
sed -i -e "/^$1/d" $IIAB_STATE_FILE
fi
#fi
if [ $1 == "calibre-web" ]; then # role directory & installed marker differ
sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE
elif [ $1 == "httpd" ]; then # role directory & installed marker differ
sed -i -e '/^apache/d' $IIAB_STATE_FILE
elif [ $1 == "osm-vector-maps" ]; then # role directory & installed marker differ
sed -i -e '/^osm_vector_maps/d' $IIAB_STATE_FILE
else
sed -i -e "/^$1/d" $IIAB_STATE_FILE
fi
fi
if [ $# -eq 2 ]; then