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
20 lines
549 B
Bash
20 lines
549 B
Bash
#!/data/data/com.termux/files/usr/bin/bash
|
|
#
|
|
# runit service: sshd
|
|
# Keeps SSH daemon running so the server can manage the phone remotely.
|
|
# Install: ln -s ~/sms-server/termux-sms/services/sshd $PREFIX/var/service/
|
|
#
|
|
|
|
# Generate host keys if missing
|
|
if [ ! -f "$PREFIX/etc/ssh/ssh_host_rsa_key" ]; then
|
|
ssh-keygen -A
|
|
fi
|
|
|
|
# Kill any standalone sshd first so we can bind the port
|
|
# (only kills the listener, not active sessions)
|
|
pkill -x sshd 2>/dev/null
|
|
sleep 1
|
|
|
|
# sshd -D = foreground (required for runit), -e = log to stderr
|
|
exec sshd -D -e 2>&1
|