16 lines
481 B
Bash
Executable File
16 lines
481 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Start feedmill recounter web UI (port 9050, override with WEB_PORT env).
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
LOG=/tmp/feedmill_web.log
|
|
|
|
if pgrep -f "python app.py" > /dev/null; then
|
|
echo "Already running (pid $(pgrep -f 'python app.py' | tr '\n' ' ')). Use restart_dashboard.sh to restart."
|
|
exit 0
|
|
fi
|
|
|
|
nohup python app.py > "$LOG" 2>&1 &
|
|
sleep 1
|
|
echo "Started. PID $(pgrep -f 'python app.py'). Log: $LOG"
|
|
echo "Open http://localhost:${WEB_PORT:-9050}"
|