Author: Terry Claiborne
Contact: kc3kmv@yahoo.com
Manual Mode + Optional Web UI Add-On
This project has two parts:
-
Base manual STFU mode
- helper script:
bm-stfu.sh - base installer:
install_bm_stfu_manual_mode.sh
- helper script:
-
Optional STFU Web UI
- web installer:
install_stfu_web.sh - web UI source files live under
web-ui/
- web installer:
The Web UI is an add-on for the base project.
It does not work by itself.
git clone https://github.com/TerryClaiborne/bm-stfu-manual-mode.git
cd bm-stfu-manual-mode
chmod +x install_bm_stfu_manual_mode.sh
sudo ./install_bm_stfu_manual_mode.shRun this only after the base manual mode is already working:
cd bm-stfu-manual-mode
chmod +x install_stfu_web.sh
sudo ./install_stfu_web.sh- install the base manual mode first
- confirm
bm-stfu.shworks - install the optional Web UI
If /usr/local/bin/bm-stfu.sh is missing, the Web UI installer will stop and tell you to install the base project first.
If you already use both the base manual mode and the Web UI, the safest normal update path is to update both.
cd ~/bm-stfu-manual-mode
git pull origin mainIf your repo clone lives somewhere else, use that path instead.
cd ~/bm-stfu-manual-mode
chmod +x install_bm_stfu_manual_mode.sh
sudo ./install_bm_stfu_manual_mode.sh
chmod +x install_stfu_web.sh
sudo ./install_stfu_web.shcd ~/bm-stfu-manual-mode
chmod +x install_bm_stfu_manual_mode.sh
sudo ./install_bm_stfu_manual_mode.shcd ~/bm-stfu-manual-mode
chmod +x install_stfu_web.sh
sudo ./install_stfu_web.shIf you use local saved favorites in the live Web UI, back them up before rerunning the Web UI installer:
sudo cp /var/www/html/stfu/favorites.txt /root/favorites.txt.backupThen restore them afterward if needed.
sudo bm-stfu.sh statusIf you use the Web UI, open:
http://YOUR_NODE_IP/stfu/
and verify that:
- Status loads correctly
- Start works
- Change TG works
- Stop works
- Favorites still work
Edit your live DVSwitch file:
sudo nano /opt/MMDVM_Bridge/DVSwitch.iniSet the values that match your system, including:
BMPasswordUserIDTalkerAliasStartTG
If STFU briefly lands on TG91 before switching to the talkgroup you requested, set:
StartTG=0The base installer prompts for these values during install:
MAIN_NODE
DVSWITCH_NODE
For a normal installer-based setup, you should not need to edit /usr/local/bin/bm-stfu.sh by hand.
If you ever need to review or change them later:
sudo nano /usr/local/bin/bm-stfu.shStart STFU on a talkgroup:
sudo bm-stfu.sh start 3220008Change talkgroups while STFU is already running:
sudo bm-stfu.sh tune 91Stop STFU and return to normal:
sudo bm-stfu.sh stopShow current status:
sudo bm-stfu.sh statusThe helper writes to:
/var/log/bm-stfu-manual-mode.log
The STFU log directory is set to:
/var/log/bm-stfu-manual-mode/
Older installs may have used:
/var/log/bm-stfu.log
/var/log/STFU.log
After confirming STFU is stopped and your current install is using the newer paths, those older files can be removed manually.
The STFU Web UI is an optional browser-based front end for bm-stfu.sh.
It provides:
- Start
- Change TG
- Stop
- Refresh Status
- Save Favorite
- Load Favorite
- Delete Favorite
- private target support with trailing
#
Example private target:
3220008#
/var/www/html/stfu
/var/www/html/stfu/index.php
/var/www/html/stfu/favorites.txt
/var/www/html/stfu/README.txt
/var/www/html/stfu/sudoers-example.txt
web-ui/index.php
web-ui/favorites.txt
web-ui/README.md
web-ui/sudoers-example.txt
Saved favorites are stored locally in:
/var/www/html/stfu/favorites.txt
Each favorite includes:
- TG / Private TG
- Station Name / Label
- Description
Warning: If you leave STFU active and then switch to AllTune2 or other DVSwitch tools, normal MMDVM_Bridge operation may not work until STFU is stopped and normal bridge mode is restored. Always press Stop before leaving the STFU Web UI or before using AllTune2.
Back up favorites first if you want to keep them:
sudo cp /var/www/html/stfu/favorites.txt /root/favorites.txt.backupRemove the live Web UI files:
sudo rm -rf /var/www/html/stfuRemove the sudoers rule:
sudo rm -f /etc/sudoers.d/stfu-webThat removes:
- the web page
- saved favorites
- the web sudoers rule
It does not remove the base STFU manual mode.
Stop STFU if it is running:
sudo bm-stfu.sh stop || trueRemove the installed helper script and binary:
sudo rm -f /usr/local/bin/bm-stfu.sh
sudo rm -f /usr/local/bin/STFURemove the STFU working directory:
sudo rm -rf /opt/STFUOptional: remove the local repo clone too:
rm -rf ~/bm-stfu-manual-modeOr, if you cloned it somewhere else, remove that directory instead.
Check:
- base manual STFU mode is installed first
bm-stfu.shworks from the command line- sudoers rule exists and is valid
favorites.txtexists and is writable bywww-data
Check Apache errors:
sudo tail -n 50 /var/log/apache2/error.logCheck PHP syntax:
sudo php -l /var/www/html/stfu/index.phpThe easiest recovery path is:
cd ~/bm-stfu-manual-mode
git pull origin mainThen:
- verify the correct
MAIN_NODEandDVSWITCH_NODEare in/usr/local/bin/bm-stfu.sh - rerun the needed installer or installers
This project supports:
- Base manual STFU mode
- Optional STFU Web UI add-on
If you use both parts, the simplest update path is usually to update both.