Improved formatting of upgrade script messages

This commit is contained in:
Jeremy Stretch 2020-02-26 15:40:05 -05:00
parent 64c9bf27c1
commit 215dbef7a0

View File

@ -18,8 +18,10 @@ fi
COMMAND="/usr/bin/python3 -m venv ${VIRTUALENV}" COMMAND="/usr/bin/python3 -m venv ${VIRTUALENV}"
echo "Creating a new virtual environment at ${VIRTUALENV}..." echo "Creating a new virtual environment at ${VIRTUALENV}..."
eval $COMMAND || { eval $COMMAND || {
echo "Failed to create the virtual environment. Check that you have the" echo "--------------------------------------------------------------------"
echo "required system packages installed." echo "ERROR: Failed to create the virtual environment. Check that you have"
echo "the required system packages installed."
echo "--------------------------------------------------------------------"
exit 1 exit 1
} }
@ -52,11 +54,13 @@ echo "Clearing cache data ($COMMAND)..."
eval $COMMAND eval $COMMAND
if [ WARN_MISSING_VENV ]; then if [ WARN_MISSING_VENV ]; then
echo "No existing virtual environment was detected. A new one has been" echo "--------------------------------------------------------------------"
echo "created. Update your systemd service files to reflect the new" echo "WARNING: No existing virtual environment was detected. A new one has"
echo "been created. Update your systemd service files to reflect the new"
echo "executables." echo "executables."
echo " Python: ${VIRTUALENV}/bin/python" echo " Python: ${VIRTUALENV}/bin/python"
echo " gunicorn: ${VIRTUALENV}/bin/gunicorn" echo " gunicorn: ${VIRTUALENV}/bin/gunicorn"
echo "--------------------------------------------------------------------"
fi fi
echo "Upgrade complete! Don't forget to restart the NetBox services:" echo "Upgrade complete! Don't forget to restart the NetBox services:"