44 lines
1.0 KiB
Bash
Executable File
44 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "Restarting infoscreen services..."
|
|
|
|
# Kill existing processes first
|
|
./scripts/kill-all.sh
|
|
|
|
sleep 2
|
|
|
|
# Load .env for environment variables
|
|
if [ -f .env ]; then
|
|
set -a
|
|
source .env
|
|
set +a
|
|
fi
|
|
|
|
# Create log directory if it doesn't exist
|
|
mkdir -p logs
|
|
|
|
# Start simclient.py with nohup (persists after SSH disconnect)
|
|
echo "Starting simclient.py..."
|
|
nohup ./scripts/start-dev.sh > logs/simclient.log 2>&1 &
|
|
SIMCLIENT_PID=$!
|
|
echo "✓ simclient.py started (PID: $SIMCLIENT_PID)"
|
|
|
|
# Start display_manager.py with nohup (persists after SSH disconnect)
|
|
echo "Starting display_manager.py..."
|
|
nohup ./scripts/start-display-manager.sh > logs/display_manager.log 2>&1 &
|
|
DISPLAY_PID=$!
|
|
echo "✓ display_manager.py started (PID: $DISPLAY_PID)"
|
|
|
|
echo ""
|
|
echo "Both services are running and will persist after SSH disconnect."
|
|
echo ""
|
|
echo "Monitor logs:"
|
|
echo " tail -f logs/simclient.log"
|
|
echo " tail -f logs/display_manager.log"
|
|
echo ""
|
|
echo "Kill processes:"
|
|
echo " ./scripts/kill-all.sh"
|