From 5e304f94815f221f2841a4fbe787ad5ac2b72b70 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 13 Feb 2026 15:46:48 +0400 Subject: [PATCH] Enable Auto-SSL injection during fresh install --- install/installCyberPanel.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 93fad9bb7..836e031d8 100644 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -499,6 +499,24 @@ module cyberpanel_ols { # Configure the custom module self.configureCustomModule() + # Enable Auto-SSL in httpd_config.conf + try: + conf_path = '/usr/local/lsws/conf/httpd_config.conf' + if os.path.exists(conf_path): + with open(conf_path, 'r') as f: + content = f.read() + if 'autoSSL' not in content: + content = content.replace( + 'adminEmails', + 'adminEmails root@localhost\nautoSSL 1\nacmeEmail admin@cyberpanel.net', + 1 + ) + with open(conf_path, 'w') as f: + f.write(content) + InstallCyberPanel.stdOut("Auto-SSL enabled in httpd_config.conf", 1) + except Exception as e: + InstallCyberPanel.stdOut(f"WARNING: Could not enable Auto-SSL: {e}", 1) + else: try: try: