Add remove symlink for wo update -le=off
This commit is contained in:
@@ -1468,6 +1468,17 @@ class WOSiteUpdateController(CementBaseController):
|
||||
'{0}/conf/nginx/'
|
||||
'hsts.conf.disabled'
|
||||
.format(wo_site_webroot))
|
||||
# find all broken symlinks
|
||||
sympath = "/var/www"
|
||||
sslconf = ("{0}/conf/nginx/ssl.conf"
|
||||
.format(wo_site_webroot))
|
||||
symlinks = WOFileUtils.findBrokenSymlink(self, sympath)
|
||||
|
||||
for symlink in symlinks:
|
||||
wo_symlink = os.readlink('{0}'.format(symlink))
|
||||
if wo_symlink == sslconf:
|
||||
# remove broken symlinks
|
||||
WOFileUtils.remove_symlink(self, symlink)
|
||||
elif (pargs.letsencrypt == "clean" or
|
||||
pargs.letsencrypt == "purge"):
|
||||
removeAcmeConf(self, wo_domain)
|
||||
|
||||
Reference in New Issue
Block a user