Added support to mod_md with letsencrypt

This commit is contained in:
Antonio de la Rosa 2024-09-03 23:33:42 +02:00
parent 52669ad169
commit 5883de45dd
4 changed files with 73 additions and 183 deletions

View file

@ -65,8 +65,13 @@ class ServerTask(Task):
if self.data.get('password', '')!='':
password='--password=%s' % self.data.get('password', '')
debug_opt=''
if 'debug' in self.data:
debug_opt='--debug'
self.commands_to_execute=[['modules/apache/scripts/manage_apache.py', '--operation=add --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s --port=%s %s %s %s' % (self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], self.data['port'], password, indexes, allow_override), 'sudo']]
self.commands_to_execute=[['modules/apache/scripts/manage_apache.py', '--operation=add --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s --%s --port=%s %s %s %s' % (self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], debug_opt, self.data['port'], password, indexes, allow_override), 'sudo']]
return True

View file

@ -115,9 +115,14 @@ class ServerTask(Task):
self.files.append(['modules/apache/scripts/delete_php.py', 0o700])
self.commands_to_execute.append(['modules/apache/scripts/delete_php.py', '--domain=%s' % self.data['domain']])
debug_opt=''
if 'debug' in self.data:
debug_opt='--debug'
self.commands_to_execute.append(['modules/apache/scripts/manage_apache.py', '--operation=edit --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s --port=%s --ssl=%s --ssl_port=%s --aliases=%s %s %s %s' % (self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], self.data['port'], self.data['ssl'], self.data['ssl_port'], self.data['aliases'], indexes, allow_override, redirect_ssl), 'sudo'])
self.commands_to_execute.append(['modules/apache/scripts/manage_apache.py', '--operation=edit %s --domain=%s --email=%s --user=%s --root_dir=%s --type_cgi=%s --ip=%s --port=%s --ssl=%s --ssl_port=%s --aliases=%s %s %s %s' % (debug_opt, self.data['domain'], self.data['email'], self.data['user'], self.data['root_dir'], self.data['cgi_type'], self.data['ip'], self.data['port'], self.data['ssl'], self.data['ssl_port'], self.data['aliases'], indexes, allow_override, redirect_ssl), 'sudo'])
#print(self.commands_to_execute[0])
return True
"""