changemaker.lite/termux-sms/start-all-services.sh
bunker-admin 9321aeb263 Move SMS phone bridge from campaign_connector submodule into main repo
Consolidates the Termux SMS server code (previously in a separate
campaign_connector git submodule) into termux-sms/ at repo root.
Updates phone clone commands to use sparse checkout so only the
termux-sms/ directory is downloaded onto the Android device.

Bunker Admin
2026-03-31 11:04:14 -06:00

33 lines
1013 B
Bash
Executable File

#!/data/data/com.termux/files/usr/bin/bash
#
# Start all SMS Campaign Manager services via runit (termux-services)
# Prerequisite: run setup-services.sh first to install and register services
#
echo "Starting SMS Campaign Manager Services..."
echo ""
# Acquire wake lock
termux-wake-lock 2>/dev/null
# Source runit helpers
source "$PREFIX/etc/profile.d/start-services.sh" 2>/dev/null || true
# Ensure services are up
sv up sms-api 2>/dev/null && echo " sms-api: started" || echo " sms-api: failed (run setup-services.sh first)"
sv up sshd-custom 2>/dev/null && echo " sshd-custom: started" || echo " sshd-custom: failed (run setup-services.sh first)"
echo ""
# Wait for startup
sleep 3
# Status
echo "Service Status:"
sv status sms-api 2>/dev/null || echo " sms-api: not registered"
sv status sshd-custom 2>/dev/null || echo " sshd-custom: not registered"
echo ""
echo "Health Check:"
curl -s http://localhost:5001/health > /dev/null && echo " SMS API: Healthy" || echo " SMS API: Not responding"