38 lines
1.3 KiB
Bash
Executable File
38 lines
1.3 KiB
Bash
Executable File
# Start all SMS Campaign Manager services
|
|
|
|
echo "🚀 Starting SMS Campaign Manager Services..."
|
|
echo "📱 Device: $(ifconfig 2>/dev/null | grep -A1 wlan0 | grep inet | awk '{print $2}' | cut -d: -f2)"
|
|
echo ""
|
|
|
|
# Ensure logs directory exists
|
|
mkdir -p ~/logs
|
|
|
|
# Start SMS API Server (if not already running)
|
|
if ! pgrep -f "termux-sms-api-server.py" > /dev/null; then
|
|
echo "🔄 Starting SMS API Server..."
|
|
~/bin/start-sms-api.sh > ~/logs/sms-api-startup.log 2>&1 &
|
|
sleep 2
|
|
echo "✅ SMS API Server started"
|
|
else
|
|
echo "✅ SMS API Server already running"
|
|
fi
|
|
|
|
# Start Monitoring Interface (if not already running)
|
|
if ! pgrep -f "python app.py" > /dev/null; then
|
|
echo "🔄 Starting Monitoring Interface..."
|
|
~/bin/start-monitoring.sh
|
|
sleep 2
|
|
echo "✅ Monitoring Interface started"
|
|
else
|
|
echo "✅ Monitoring Interface already running"
|
|
fi
|
|
|
|
echo ""
|
|
echo "🌐 Services Available:"
|
|
echo " 📡 SMS API Server: http://10.0.0.193:5001"
|
|
echo " 📊 Monitoring Dashboard: http://10.0.0.193:5000"
|
|
echo ""
|
|
echo "🔍 Health Checks:"
|
|
curl -s http://localhost:5001/health > /dev/null && echo " ✅ SMS API Server: Healthy" || echo " ❌ SMS API Server: Not responding"
|
|
curl -s http://localhost:5000/ > /dev/null && echo " ✅ Monitoring Interface: Healthy" || echo " ❌ Monitoring Interface: Not responding"
|