Files
ledgrab/server/restart.sh
T
alexei.dolgolyov 02cd9d519c
Lint & Test / test (push) Successful in 1m56s
refactor: rename project to LedGrab, split HA integration into separate repo
- Rename Python package: wled_controller -> ledgrab
- Rename env var prefix: WLED_ -> LEDGRAB_ (with auto-migration for old vars)
- Rename localStorage key: wled_api_key -> ledgrab_api_key (with migration)
- Rename HA integration domain: wled_screen_controller -> ledgrab
- Update all imports, build scripts, Docker, installer, config, docs
- Remove HA integration (moved to ledgrab-haos-integration repo)
- Remove hacs.json (belongs in HA repo now)
- Add startup warning for users with old WLED_ env vars
- All tests pass (715/715), ruff clean, tsc clean, frontend builds
2026-04-12 22:45:28 +03:00

28 lines
664 B
Bash

#!/usr/bin/env bash
# Restart the LedGrab server (Linux/macOS)
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Stop any running instance
PIDS=$(pgrep -f 'ledgrab\.main' 2>/dev/null || true)
if [ -n "$PIDS" ]; then
echo "Stopping server (PID $PIDS)..."
pkill -f 'ledgrab\.main' 2>/dev/null || true
sleep 2
fi
# Start server detached
echo "Starting server..."
cd "$SCRIPT_DIR"
nohup python -m ledgrab.main > /dev/null 2>&1 &
sleep 3
# Verify it's running
NEW_PID=$(pgrep -f 'ledgrab\.main' 2>/dev/null || true)
if [ -n "$NEW_PID" ]; then
echo "Server started (PID $NEW_PID)"
else
echo "WARNING: Server does not appear to be running!"
fi