VultureProject / vulture3-gui

Vulture 3 Management GUI (Django project)
GNU General Public License v3.0
4 stars 5 forks source link

1.79: ModuleNotFoundError: No module named 'gui.models.mod_ssl' #24

Open Skouat opened 2 years ago

Skouat commented 2 years ago

Hi,

The following line returns an error

https://github.com/VultureProject/vulture3-gui/blob/7b4d6199b5121053a5d2142da433cd201cc3b3d8/crontab/vlt-gui/acme-renew.py#L38

Traceback (most recent call last): File "/home/vlt-gui/vulture/crontab/vlt-gui/acme-renew.py", line 38, in from gui.models.mod_ssl import ModSSL ModuleNotFoundError: No module named 'gui.models.mod_ssl'

Any ideas how to fix it?

NRGLine4Sec commented 2 years ago

Hi @Skouat, I had the same issue as you. This is because the class map ModSSL is not defined in /usr/home/vlt-gui/vulture/gui/forms/mod_ssl.py but in /usr/home/vlt-gui/vulture/gui/forms/modssl_settings.py. To workaround this I have done these commands :

chmod +w /home/vlt-gui/vulture/crontab/vlt-gui/acme-renew.py && sed -i '' 's/from gui.models.mod_ssl import ModSSL/from gui.models.modssl_settings import ModSSL/g' /home/vlt-gui/vulture/crontab/vlt-gui/acme-renew.py
/home/vlt-gui/env/bin/python /home/vlt-gui/vulture/crontab/vlt-gui/acme-renew.py
Skouat commented 2 years ago

Hi @NRGLine4Sec,

Thanks for your feedback.

I already try this workaround, but even if the SSL certs are renewed, the script returns another error

Reloading ssl profile 'accepted_ca' certificates Traceback (most recent call last): File "/home/vlt-gui/vulture/crontab/vlt-gui/acme-renew.py", line 132, in modssl.writeConf() AttributeError: 'str' object has no attribute 'writeConf'

NRGLine4Sec commented 2 years ago

Yes, I had exactly the same error, but it seems like the certificate was renewed properly in Vulture nevertheless.