Fixes in apache
This commit is contained in:
parent
d9303437a9
commit
8231aa715c
2 changed files with 27 additions and 4 deletions
|
|
@ -181,7 +181,7 @@ def manage():
|
|||
SSLEngine on
|
||||
|
||||
"""
|
||||
|
||||
"""
|
||||
vhost_ssl=vhost_ssl.replace('$port', args.ssl_port)
|
||||
vhost_ssl=vhost_ssl.replace('$ip', args.ip)
|
||||
vhost_ssl=vhost_ssl.replace('$email', args.email)
|
||||
|
|
@ -218,8 +218,8 @@ def manage():
|
|||
|
||||
json_return={'error':0, 'status': 0, 'progress': 100, 'no_progress':0, 'message': 'Creating SSL Cert with Letsencrypt using mod_md...'}
|
||||
print(json.dumps(json_return))
|
||||
|
||||
"""
|
||||
|
||||
ssl_debug=''
|
||||
|
||||
if debug:
|
||||
|
|
@ -292,7 +292,7 @@ def manage():
|
|||
vhost+="\n\n"+vhost_ssl
|
||||
|
||||
pass
|
||||
"""
|
||||
|
||||
if type_ssl==2:
|
||||
vhost_ssl=vhost_ssl.replace('$port', args.ssl_port)
|
||||
vhost_ssl=vhost_ssl.replace('$ip', args.ip)
|
||||
|
|
@ -589,6 +589,25 @@ def manage():
|
|||
print(json.dumps(json_return))
|
||||
#time.sleep(1)
|
||||
|
||||
# Delete certbot certificate if exists
|
||||
|
||||
#sudo /opt/certbot/bin/certbot delete --cert-name server1.yotex.net -n
|
||||
|
||||
if call("sudo /opt/certbot/bin/certbot delete --cert-name {} -n".format(args.domain), shell=True) > 0:
|
||||
json_return['error']=0
|
||||
json_return['status']=0
|
||||
json_return['progress']=100
|
||||
json_return['message']='I cannot delete the certificate, please, if exists, clean manually'
|
||||
|
||||
print(json.dumps(json_return))
|
||||
else:
|
||||
json_return['error']=0
|
||||
json_return['status']=0
|
||||
json_return['progress']=100
|
||||
json_return['message']='Cleaning certbot ssl certificate for the domain'
|
||||
|
||||
print(json.dumps(json_return))
|
||||
|
||||
# Delete root_dir if exists
|
||||
# Change effective uid
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue