-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·27 lines (24 loc) · 767 Bytes
/
Copy pathstart.sh
File metadata and controls
executable file
·27 lines (24 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# ============================================================
# NERA QUANT - Start Script
# ============================================================
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PIDFILE="$DIR/nera_quant.pid"
LOGFILE="$DIR/nera_quant.log"
# Cek apakah sudah jalan
if [ -f "$PIDFILE" ]; then
PID=$(cat "$PIDFILE")
if kill -0 "$PID" 2>/dev/null; then
echo "⚠️ NERA QUANT sudah jalan (PID: $PID)"
echo " Gunakan: bash stop.sh untuk menghentikan"
exit 1
else
rm -f "$PIDFILE"
fi
fi
echo "🚀 Starting NERA QUANT..."
nohup python3 "$DIR/main.py" >> "$LOGFILE" 2>&1 &
PID=$!
echo $PID > "$PIDFILE"
echo "✅ Jalan di background (PID: $PID)"
echo "📄 Log: tail -f $LOGFILE"