Update grafana-install.sh

This commit is contained in:
tschettervictor
2024-12-01 17:24:31 -07:00
committed by GitHub
parent cb9be0bb72
commit c14e28fe9c

View File

@@ -9,6 +9,13 @@ if ! [ $(id -u) = 0 ]; then
exit 1
fi
# Check for Reinstall
if [ "$(ls -A /usr/local/share/grafana 2>/dev/null)" ]; then
echo "Existing ${APP_NAME} data detected."
echo "Starting reinstall..."
REINSTALL="true"
fi
# Install Packages
pkg install -y \
grafana
@@ -23,3 +30,13 @@ echo "Installation complete."
echo "$APP_NAME is running on port 32400"
echo "Default user is admin and password is admin."
echo "---------------"
if [ "${REINSTALL}" == "true" ]; then
echo "You did a reinstall."
echo "Please user your old credentials to log in."
echo "---------------"
else
echo "User Information"
echo "Default ${APP_NAME} user is admin"
echo "Default ${APP_NAME} password is admin"
echo "---------------"
fi