mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
9e0aea211d
1 changed files with 28 additions and 28 deletions
56
runrole
56
runrole
|
@ -23,49 +23,49 @@ if [[ $# -eq 0 ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "--reinstall" ]; then
|
if [ "$1" == "--reinstall" ]; then
|
||||||
ARGS="$ARGS --extra-vars reinstall=True"
|
ARGS="$ARGS -e reinstall=True"
|
||||||
REINSTALL=1
|
REINSTALL=1
|
||||||
shift 1
|
shift 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "^""$1""_install: True" $LOCAL_VARS_FILE; then
|
#if ! grep -q "^""$1""_install: True" $LOCAL_VARS_FILE; then
|
||||||
echo "ERROR: $LOCAL_VARS_FILE must contain '""$1""_install: True'"
|
# echo "ERROR: $LOCAL_VARS_FILE must contain '""$1""_install: True'"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# Needed for Stages 1-3 if not installed yet
|
# Needed for Stages 1-3 if not installed yet
|
||||||
if [ ! -f $IIAB_STATE_FILE ]; then
|
if [ ! -f $IIAB_STATE_FILE ]; then
|
||||||
touch $IIAB_STATE_FILE
|
touch $IIAB_STATE_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q $1_install $LOCAL_VARS_FILE; then
|
#if ! grep -q $1_install $LOCAL_VARS_FILE; then
|
||||||
echo " $1_install: not found in $VARS"
|
# echo " $1_install: not found in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
# echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
# exit 1
|
||||||
elif grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" False; then
|
#elif grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" False; then
|
||||||
echo " $1_install: set to False found in $VARS"
|
# echo " $1_install: set to False found in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
# echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
# exit 1
|
||||||
elif grep $1_install $LOCAL_VARS_FILE | grep -q "#"; then
|
#elif grep $1_install $LOCAL_VARS_FILE | grep -q "#"; then
|
||||||
echo " $1_install: commented out (#) in $VARS"
|
# echo " $1_install: commented out (#) in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
# echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
# exit 1
|
||||||
else
|
#else
|
||||||
if grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" True; then
|
# if grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" True; then
|
||||||
echo " $1_install: set to True found in $VARS"
|
# echo " $1_install: set to True found in $VARS"
|
||||||
echo " continuing...."
|
# echo " continuing...."
|
||||||
else
|
# else
|
||||||
echo "somthing went wrong to get here"
|
# echo "somthing went wrong to get here"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [ "$REINSTALL" == "1" ]; then
|
if [ "$REINSTALL" == "1" ]; then
|
||||||
if [ ! $1 == "internetarchive" ]; then # special handling
|
if [ ! $1 == "internetarchive" ]; then # special handling
|
||||||
if [ $1 == "calibre-web" ]; then # role directory & installed marker differ
|
if [ $1 == "calibre-web" ]; then # role directory & installed marker differ
|
||||||
sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE
|
sed -i -e '/^calibreweb/d' $IIAB_STATE_FILE
|
||||||
elif [ $1 == "captive-portal" ]; then # role directory & installed marker differ
|
elif [ $1 == "osm-vector-maps" ]; then # role directory & installed marker differ
|
||||||
sed -i -e '/^captive_portal/d' $IIAB_STATE_FILE
|
sed -i -e '/^osm_vector_maps/d' $IIAB_STATE_FILE
|
||||||
#elif [ $1 == "bluetooth" ]; then # role directory & installed marker differ
|
#elif [ $1 == "bluetooth" ]; then # role directory & installed marker differ
|
||||||
# sed -i -e '/^pan_bluetooth/d' $IIAB_STATE_FILE
|
# sed -i -e '/^pan_bluetooth/d' $IIAB_STATE_FILE
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue