mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
do not upgrade elastic script if some requirements are not found
This commit is contained in:
parent
c046b1d26b
commit
df465a7f86
@ -10,6 +10,11 @@
|
|||||||
|
|
||||||
config()
|
config()
|
||||||
{
|
{
|
||||||
|
if [ "$(whoami)" != "root" ]
|
||||||
|
then
|
||||||
|
echo "Please do not run this script as root, elevation will be prompted if needed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "detecting curl..."
|
echo "detecting curl..."
|
||||||
if ! command -v curl
|
if ! command -v curl
|
||||||
then
|
then
|
||||||
@ -70,6 +75,9 @@ config()
|
|||||||
elif [ -f "$FM_PATH/config/env" ]
|
elif [ -f "$FM_PATH/config/env" ]
|
||||||
then
|
then
|
||||||
ES_HOST=$(cat "$FM_PATH/config/env" | grep ELASTICSEARCH_HOST | awk '{split($0,a,"="); print a[2]}')
|
ES_HOST=$(cat "$FM_PATH/config/env" | grep ELASTICSEARCH_HOST | awk '{split($0,a,"="); print a[2]}')
|
||||||
|
else
|
||||||
|
echo "Fab-manager's environment file not found, please run this script from the installation folder"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
ES_IP=$(getent ahostsv4 "$ES_HOST" | awk '{ print $1 }' | uniq)
|
ES_IP=$(getent ahostsv4 "$ES_HOST" | awk '{ print $1 }' | uniq)
|
||||||
else
|
else
|
||||||
@ -188,6 +196,7 @@ detect_installation()
|
|||||||
else
|
else
|
||||||
echo "Note: You can use \`docker logs CONTAINER\` to view the logs";
|
echo "Note: You can use \`docker logs CONTAINER\` to view the logs";
|
||||||
fi
|
fi
|
||||||
|
exit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user