Add config removal
This commit is contained in:
@@ -1441,8 +1441,13 @@ class WOSiteUpdateController(CementBaseController):
|
||||
|
||||
elif data['letsencrypt'] is False:
|
||||
if pargs.letsencrypt == "off":
|
||||
if os.path.isfile("{0}/conf/nginx/ssl.conf"
|
||||
if os.path.islink("{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot)):
|
||||
WOFileUtils.remove_symlink(self,
|
||||
"{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot))
|
||||
elif os.path.isfile("{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot)):
|
||||
Log.info(self, 'Setting Nginx configuration')
|
||||
WOFileUtils.mvfile(self, "{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot),
|
||||
|
||||
@@ -1270,6 +1270,10 @@ def removeAcmeConf(self, domain):
|
||||
if os.path.islink('{0}'.format(sslconf)):
|
||||
# remove broken symlinks
|
||||
WOFileUtils.remove_symlink(self, symlink)
|
||||
else:
|
||||
if os.path.islink("{0}".format(sslconf)):
|
||||
WOFileUtils.remove_symlink(self, "{0}".format(sslconf))
|
||||
WOFileUtils.rm(self, '{0}'.format(sslforce))
|
||||
|
||||
if WOFileUtils.grepcheck(self, '/var/www/22222/conf/nginx/ssl.conf',
|
||||
'{0}'.format(domain)):
|
||||
|
||||
Reference in New Issue
Block a user