Files
lollms_hub/reset.sh
Saifeddine ALOUI b5c2dfdade chore(rebrand): rename project from "Ollama Proxy Fortress" to "lollms hub"
Update all project references, documentation, and assets to reflect the new
branding. Changes include:
- Rename application references in README, CONTRIBUTING, DEVELOPMENT
- Update default database filename from ollama_proxy.db to lollms_hub.db
- Update .env.example header and bootstrap configuration
- Adjust .gitignore for new database name
- No functional code changes, purely cosmetic rebranding
2026-03-22 01:12:20 +01:00

83 lines
2.5 KiB
Bash

#!/bin/bash
# ====================================================================
#
# LoLLMs Hub Fortress - FULL RESET SCRIPT
# For: macOS & Linux
#
# ====================================================================
# --- Colors for the warning message ---
COLOR_RESET='\e[0m'
COLOR_ERROR='\e[1;31m' # Bold Red
COLOR_WARN='\e[1;33m' # Bold Yellow
clear
# --- Display the Irreversible Action Warning ---
echo -e "${COLOR_ERROR}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo -e "${COLOR_ERROR}!! W A R N I N G !!"
echo -e "${COLOR_ERROR}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${COLOR_RESET}"
echo
echo -e "${COLOR_WARN}This script will completely reset the application.${COLOR_RESET}"
echo "The following actions will be performed:"
echo
echo " - The Python virtual environment ('venv') will be deleted."
echo " - The configuration file ('.env') will be deleted."
echo " - The setup state file ('.setup_state') will be deleted."
echo " - The database ('lollms_hub.db') will be deleted."
echo " - All generated Python cache files ('__pycache__') will be removed."
echo
echo -e "${COLOR_ERROR}This operation is IRREVERSIBLE and all your users, API keys,"
echo -e "and settings will be permanently lost.${COLOR_RESET}"
echo
# --- Require User Confirmation ---
read -p "To confirm you want to proceed, please type 'reset now': " CONFIRMATION
if [[ "$CONFIRMATION" != "reset now" ]]; then
echo
echo "Confirmation not received. Reset has been cancelled."
exit 1
fi
echo
echo "Confirmation received. Proceeding with the reset..."
echo
# --- Perform Deletion Actions ---
echo "1. Deleting Python virtual environment ('venv')..."
rm -rf venv
echo " - Done."
echo "2. Deleting configuration file ('.env')..."
rm -f .env
echo " - Done."
echo "3. Deleting setup state file ('.setup_state')..."
rm -f .setup_state
echo " - Done."
echo "4. Deleting database file ('lollms_hub.db')..."
rm -f lollms_hub.db lollms_hub.db-journal
echo " - Done."
echo "5. Deleting Alembic versions (optional, for clean migration history)..."
# In case of corrupted migrations, this is a good idea.
# We recreate the directory so alembic doesn't fail.
if [ -d "alembic/versions" ]; then
rm -rf alembic/versions/*
touch alembic/versions/.gitkeep
fi
echo " - Done."
echo "6. Cleaning up Python cache files..."
find . -type d -name "__pycache__" -exec rm -r {} +
echo " - Done."
echo
echo -e "${COLOR_SUCCESS}Reset complete.${COLOR_RESET}"
echo "You can now run 'run.sh' to start a fresh installation."
echo