scripts/fpp_uninstall.sh currently only prints messages — it removes nothing:
#!/bin/bash
echo "Uninstalling Advanced Stats Plugin..."
echo ""
echo "Advanced Stats Plugin uninstalled successfully"
Per the FPP plugin guidelines the uninstall script "must reverse every side effect created outside the plugin directory" and be "safe to run more than once". The following artifacts are all left behind:
| Artifact |
Created by |
mqtt_listener.py still running |
scripts/postStart.sh launches it; FPP does not run preStop.sh on uninstall, so it keeps running (executing a deleted file) until the next fppd stop/reboot |
/home/fpp/media/config/plugin.fpp-plugin-AdvancedStats.db (+ -journal/-wal/-shm) |
init_database.php — this is the multi-GB file from the growth issues |
…/config/plugin.fpp-plugin-AdvancedStats.db.backup-<timestamp> (unbounded count) |
api.php restore (copy ~line 723) and empty-DB (copy ~line 761) |
/home/fpp/media/logs/fpp-plugin-AdvancedStats.log |
fpp_install.sh, mqtt_listener.py, callbacks.py, functions.inc.php |
/home/fpp/media/config/plugin.fpp-plugin-AdvancedStats (settings ini) |
api.php advancedStatsSaveSettings() |
python3-paho-mqtt (installed by fpp_install.sh) is a shared dependency and is conventionally left in place.
Related guideline deviations noticed while reviewing:
- The log file should be named
plugin-fpp-plugin-AdvancedStats.log (the plugin-<repoName>.log pattern). As-is it does not match plugin-*.log, so FPP's built-in log rotation never touches it and it grows unbounded. (Renaming touches Python + PHP writers; suggest a separate change.)
- Plugin data lives in
config/ rather than <mediadir>/plugindata/, which also pulls the large DB into FPP config backups.
- The script prints "uninstalled successfully" unconditionally.
A PR replacing fpp_uninstall.sh with an idempotent cleanup (stop listener, remove DB + sidecars + .backup-*, remove log, remove settings file) follows.
scripts/fpp_uninstall.shcurrently only prints messages — it removes nothing:Per the FPP plugin guidelines the uninstall script "must reverse every side effect created outside the plugin directory" and be "safe to run more than once". The following artifacts are all left behind:
mqtt_listener.pystill runningscripts/postStart.shlaunches it; FPP does not runpreStop.shon uninstall, so it keeps running (executing a deleted file) until the nextfppdstop/reboot/home/fpp/media/config/plugin.fpp-plugin-AdvancedStats.db(+-journal/-wal/-shm)init_database.php— this is the multi-GB file from the growth issues…/config/plugin.fpp-plugin-AdvancedStats.db.backup-<timestamp>(unbounded count)api.phprestore (copy~line 723) and empty-DB (copy~line 761)/home/fpp/media/logs/fpp-plugin-AdvancedStats.logfpp_install.sh,mqtt_listener.py,callbacks.py,functions.inc.php/home/fpp/media/config/plugin.fpp-plugin-AdvancedStats(settings ini)api.phpadvancedStatsSaveSettings()python3-paho-mqtt(installed byfpp_install.sh) is a shared dependency and is conventionally left in place.Related guideline deviations noticed while reviewing:
plugin-fpp-plugin-AdvancedStats.log(theplugin-<repoName>.logpattern). As-is it does not matchplugin-*.log, so FPP's built-in log rotation never touches it and it grows unbounded. (Renaming touches Python + PHP writers; suggest a separate change.)config/rather than<mediadir>/plugindata/, which also pulls the large DB into FPP config backups.A PR replacing
fpp_uninstall.shwith an idempotent cleanup (stop listener, remove DB + sidecars +.backup-*, remove log, remove settings file) follows.