main: Fix or remove diagnose command
The --diagnose
command line option is broken, probably for a while since no one really uses it.
fbx@freedombox:/$ sudo -u plinth /freedombox/run --diagnose
INFO axes.watch_login AXES: BEGIN LOG
INFO axes.watch_login AXES: Using django-axes version 5.4.3
INFO axes.watch_login AXES: blocking by IP only.
INFO plinth.__main__ FreedomBox Service (Plinth) version - 21.4
INFO plinth.__main__ Script prefix - /plinth
INFO plinth.module_loader Initializing apps - help, cockpit, diagnostics, firewall, names, avahi, power, users, apache, security, sso, ssh, upgrades, dynamicdns, storage, backups, snapshot, config, networks, first_boot, datetime, letsencrypt, minetest, searx, wireguard, ejabberd, syncthing, openvpn, shadowsocks, bepasty, monkeysphere, ttrss, transmission, mldonkey, radicale, api, mumble, mediawiki, coturn, matrixsynapse, minidlna, tor, i2p, quassel, zoph, sharing, samba, roundcube, ikiwiki, gitweb, deluge, calibre, infinoted, pagekite, privoxy, jsxc, performance, bind
INFO plinth.modules.names Added domain freedombox.local of type domain-type-local with services __all__
INFO plinth.actions # dynamicdns status
INFO plinth.actions $ ikiwiki get-sites
INFO plinth.modules.letsencrypt Checking if any Let's Encrypt certificates got renewed.
INFO plinth.actions # letsencrypt get-status
Traceback (most recent call last):
File "/freedombox/run", line 8, in <module>
plinth.__main__.main()
File "/freedombox/plinth/__main__.py", line 164, in main
run_diagnostics_and_exit()
File "/freedombox/plinth/__main__.py", line 89, in run_diagnostics_and_exit
module = importlib.import_module('plinth.modules.diagnostics.diagnostics')
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'plinth.modules.diagnostics.diagnostics'
IMO, there isn't much need to keep this option, so it could be removed.
We will just need to update this freedom-maker test that uses it:
Edited by James Valleroy