From 8145d570fe928ddc82fc62d5eca279ddb5d7f0e4 Mon Sep 17 00:00:00 2001 From: Pizza <33816021+PizzaCow@users.noreply.github.com> Date: Wed, 1 Apr 2026 16:00:25 -0600 Subject: [PATCH] feat: initial TailScan implementation --- update.sh | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/update.sh b/update.sh index 5324706..49dead3 100644 --- a/update.sh +++ b/update.sh @@ -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