Refactor code for improved readability and performance

This commit is contained in:
defiQUG
2025-12-21 22:32:09 -08:00
parent 79e3c02f50
commit b45c2006be
2259 changed files with 380318 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Start the Cloudflare credentials setup web interface
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
VENV_DIR="$PROJECT_DIR/venv"
cd "$PROJECT_DIR"
# Create virtual environment if it doesn't exist
if [[ ! -d "$VENV_DIR" ]]; then
echo "Creating virtual environment..."
python3 -m venv "$VENV_DIR"
fi
# Activate virtual environment
source "$VENV_DIR/bin/activate"
# Install dependencies if needed
if ! python -c "import flask" 2>/dev/null; then
echo "Installing Flask and requests..."
pip install flask requests --quiet
fi
# Start the web server
echo "Starting Cloudflare Setup Web Interface..."
python "$SCRIPT_DIR/cloudflare-setup-web.py"