Skip to content

fpp_uninstall.sh removes nothing; plugin data/log/DB and running listener left behind #11

Description

@pgianotto

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions