Closed pali7x closed 1 year ago
@pali7x Indeed, that's a use case we don't cover yet. We've added a new feature to the installer which now deploys a fail2ban config. What you can do as a workaround is:
Hi @tonioo, Thanks for your reply. I am already half-way on restoring the server through the latest installation with fail2ban included.
@pali7x Indeed, that's a use case we don't cover yet. We've added a new feature to the installer which now deploys a fail2ban config. What you can do as a workaround is:
- Backup you existing config file (installer.cfg) and rename it
- Run the installer to generate a new config file (using the --stop-after-configfile-check option)
- Copy the fail2ban section from the new file to the old one
- Restore your original config file
- Run the installer in upgrade mode again
I did that, but now, I have the this error:
NOTICE: view "dkim" does not exist, skipping
DROP VIEW
Traceback (most recent call last):
File "/root/modoboa-installer/./run.py", line 257, in
AttributeError: 'Modoboa' object has no attribute 'dbpassword'
You must have a formatting issue on your installer.cfg. You should back it up, regen a clean one and copy the information from the former.
Distribution: Debian 10 x64 PostgreSQL
Using sudo ./run.py --upgrade domain.com to upgrade failed, and then attempt to reinstalling also fail with the same error message.
fail2ban is already the newest version (0.10.2-2.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Traceback (most recent call last): File "/usr/lib/python3.7/configparser.py", line 845, in items d.update(self._sections[section]) KeyError: 'fail2ban'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "./run.py", line 257, in
main(sys.argv[1:])
File "./run.py", line 241, in main
scripts.install(appname, config, args.upgrade, args.restore)
File "/home/pali7x/modoboa-installer/modoboa_installer/scripts/init.py", line 29, in install
getattr(script, appname.capitalize())(config, upgrade, archive_path).run()
File "/home/pali7x/modoboa-installer/modoboa_installer/scripts/base.py", line 190, in run
self.install_config_files()
File "/home/pali7x/modoboa-installer/modoboa_installer/scripts/base.py", line 146, in install_config_files
context = self.get_template_context()
File "/home/pali7x/modoboa-installer/modoboa_installer/scripts/base.py", line 113, in get_template_context
for option, value in self.config.items(self.appname):
File "/usr/lib/python3.7/configparser.py", line 848, in items
raise NoSectionError(section)
configparser.NoSectionError: No section: 'fail2ban'