-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·42 lines (34 loc) · 1 KB
/
run.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Plex Tuner Run Script
# This script activates the virtual environment and runs the application
set -e # Exit on error
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "❌ Virtual environment not found!"
echo ""
echo "Please run setup first:"
echo " ./setup.sh"
exit 1
fi
# Check if package exists
if [ ! -d "plex_tuner" ]; then
echo "❌ plex_tuner package not found!"
exit 1
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Check if required packages are installed
if ! python3 -c "import flask, requests, smbus2" 2>/dev/null; then
echo "⚠️ Warning: Some required packages may be missing"
echo "Installing dependencies..."
pip install -q -r requirements.txt
fi
# Run the application
echo ""
echo "🎵 Starting Plex Tuner..."
echo ""
python3 -m plex_tuner