I have passed this along and gotten this response from Sol.
Thank you for taking the time to review this. This was exactly the kind of FreePBX-specific feedback I was hoping for.
I went through your suggestions and made several changes based directly on your review:
-
It no longer recursively hashes every file in every installed module. It now watches the modules database table and the stable module.xml/module.sig release markers. FreePBX’s existing module-signature system remains responsible for exhaustive file-integrity checking.
-
The framework-only fallback baseline now uses the module’s native BMO key/value storage instead of a custom one-row table. Existing baselines are migrated automatically.
-
It follows the configured AMPWEBROOT, ASTETCDIR, and ASTVARLIBDIR/ASTVARLIB values instead of assuming standard filesystem paths.
-
The obsolete functions.inc.php lifecycle bootstrap has been removed.
-
The watcher’s environment and systemd filesystem protections are regenerated using the actual FreePBX paths.
I also caught the two words you added afterward concerning AMPDBSOCK. You were correct: my first revision accounted for a custom AMPDBPORT, but not a custom database socket.
That is now fixed in 17.0.1.7:
-
The setup program reads both AMPDBPORT and AMPDBSOCK.
-
When AMPDBSOCK is configured, the MariaDB account setup uses that socket explicitly.
-
The watcher receives the same socket path and connects through PyMySQL’s Unix-socket transport.
-
When no socket is configured, it continues to use AMPDBHOST and AMPDBPORT over TCP.
-
Socket paths are validated as safe absolute paths and covered by installer and watcher tests.
I kept FreePBX 14 support because people specifically volunteered legacy systems for testing, and the same unified module archive currently passes real-image Module Admin installation and staged-change/Apply Config lifecycle tests on FreePBX 14, 15, 16, and 17. I agree that nobody should choose PHP 5.6 for a new deployment, but compatibility with an existing PBX remains useful here.
I deliberately did not make the BMO class silently install the watcher service. That operation creates a database account, installs a systemd service, and adds an Apache/PHP request sensor, so I believe it should remain an explicit root-level installation action rather than happening merely because someone enabled a GUI module.
The larger PSR-12/docblock and view-template cleanup is still worthwhile, but I kept it separate from this storage, installer, and monitoring maintenance work to reduce cross-version regression risk.
The complete FreePBX 17 Docker gate passed after these changes, along with real-image FreePBX 14, 15, and 16 lifecycle gates.
Thanks again—your review has materially improved the project. Further criticism and testing are very welcome.