feat: initial TailScan implementation

This commit is contained in:
Pizza committed 2026-04-01 16:00:25 -06:00
1 parent 91f8687509
commit 8145d570fe
1 file changed
+10 -24
+10 -24
View File
@@ -1,33 +1,19 @@
#!/usr/bin/env bash
# TailScan — Update script
#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "=== TailScan Update ==="
GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
info() { echo -e "${GREEN}[+]${NC} $1"; }
warn() { echo -e "${YELLOW}[!]${NC} $1"; }
info "Pulling latest changes..."
# Pull latest
git pull origin main
info "Updating dependencies..."
if [ -d "venv" ]; then
source venv/bin/activate
pip install -r requirements.txt -q
info "Dependencies updated."
else
warn "No venv found — run ./start.sh to set up first."
exit 1
fi
# Update Python deps
pip3 install -r requirements.txt -q
# Restart systemd service if running
# Restart service if running via systemd
if systemctl is-active --quiet tailscan 2>/dev/null; then
info "Restarting tailscan service..."
sudo systemctl restart tailscan
info "Service restarted."
systemctl status tailscan --no-pager
echo "Restarting tailscan service..."
sudo systemctl restart tailscan
echo "✅ Done. Service restarted."
else
info "Update complete. Run ./start.sh (or restart the service) to apply changes."
echo "✅ Updated. Run ./start.sh to launch."
fi