Files
2026-03-03 11:27:29 +07:00

30 lines
726 B
Bash
Executable File

#!/bin/bash
# Start the Flask web application
cd "$(dirname "$0")"
# Check if virtual environment exists, if not create it
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
source venv/bin/activate
# Install dependencies
echo "Installing dependencies..."
pip install -q -r requirements.txt
# Check if database exists
if [ ! -f "karung_counts.db" ]; then
echo "Error: Database karung_counts.db not found!"
echo "Please run the frigate_counter.py first to initialize the database."
exit 1
fi
# Run the Flask application
echo "Starting Flask web application..."
echo "Access the dashboard at: http://localhost:5000"
python web_app.py