50 lines
1.3 KiB
Bash
50 lines
1.3 KiB
Bash
#!/bin/bash
|
|
# Start Inou services
|
|
cd /tank/inou
|
|
|
|
echo "=== Inou Start ==="
|
|
|
|
# API (start first, portal proxies to it)
|
|
if pgrep -f "bin/api$" > /dev/null; then
|
|
echo "API: already running (PID $(pgrep -f 'bin/api$'))"
|
|
else
|
|
./bin/api >> /tank/inou/logs/api.log 2>&1 &
|
|
sleep 0.5
|
|
if pgrep -f "bin/api$" > /dev/null; then
|
|
echo "API: started (PID $!)"
|
|
else
|
|
echo "API: FAILED - check logs/api.log"
|
|
fi
|
|
fi
|
|
|
|
# Viewer
|
|
if pgrep -f "bin/viewer$" > /dev/null; then
|
|
echo "Viewer: already running (PID $(pgrep -f 'bin/viewer$'))"
|
|
else
|
|
./bin/viewer >> /tank/inou/logs/viewer.log 2>&1 &
|
|
sleep 0.5
|
|
if pgrep -f "bin/viewer$" > /dev/null; then
|
|
echo "Viewer: started (PID $!)"
|
|
else
|
|
echo "Viewer: FAILED - check logs/viewer.log"
|
|
fi
|
|
fi
|
|
|
|
# Portal
|
|
if pgrep -f "bin/portal$" > /dev/null; then
|
|
echo "Portal: already running (PID $(pgrep -f 'bin/portal$'))"
|
|
else
|
|
./bin/portal >> /tank/inou/logs/portal.log 2>&1 &
|
|
sleep 0.5
|
|
if pgrep -f "bin/portal$" > /dev/null; then
|
|
echo "Portal: started (PID $!)"
|
|
else
|
|
echo "Portal: FAILED - check logs/portal.log"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "Portal: https://inou.com"
|
|
echo "Viewer: https://inou.com:8767"
|
|
echo "API: https://inou.com/api/* (internal :8082)"
|