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

20 lines
620 B
Bash

#!/data/data/com.termux/files/usr/bin/bash
#
# runit service: sms-api
# Runs the Flask SMS API server under termux-services supervision.
# Install: ln -s ~/sms-server/termux-sms/services/sms-api $PREFIX/var/service/
#
# Source environment (API key, etc.)
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
# Ensure log directory exists
mkdir -p "$HOME/logs"
# Acquire wake lock (idempotent — safe to call multiple times)
termux-wake-lock 2>/dev/null
# exec replaces the shell with python so runit tracks the real PID
exec python "$HOME/sms-server/termux-sms/termux-sms-api-server.py" \
>> "$HOME/logs/sms-api.log" 2>&1