-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·49 lines (38 loc) · 957 Bytes
/
setup.sh
File metadata and controls
executable file
·49 lines (38 loc) · 957 Bytes
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
43
44
45
46
47
48
49
#!/bin/bash
# NetBox Setup Script
# Creates virtual environment and installs dependencies
set -e
echo "=== NetBox Setup ==="
echo ""
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "ERROR: python3 not found"
echo "Please install Python 3.8 or higher"
exit 1
fi
echo "Python version:"
python3 --version
echo ""
# Remove old venv if exists
if [ -d ".venv" ]; then
echo "Removing old virtual environment..."
rm -rf .venv
fi
# Create virtual environment
echo "Creating virtual environment..."
python3 -m venv .venv
# Activate virtual environment
echo "Activating virtual environment..."
source .venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo "Installing dependencies from requirements.txt..."
pip install -r requirements.txt
echo ""
echo "=== Setup Complete ==="
echo ""
echo "To start the server:"
echo " ./start_server.sh"
echo ""