Copy file before creating a symlink
This commit is contained in:
@@ -1263,6 +1263,8 @@ def removeAcmeConf(self, domain):
|
|||||||
WOFileUtils.rm(self, '{0}'.format(sslforce))
|
WOFileUtils.rm(self, '{0}'.format(sslforce))
|
||||||
WOFileUtils.rm(self, '{0}.disabled'
|
WOFileUtils.rm(self, '{0}.disabled'
|
||||||
.format(sslforce))
|
.format(sslforce))
|
||||||
|
WOFileUtils.rm(self, '/etc/letsencrypt/shared/{0}.conf'
|
||||||
|
.format(domain))
|
||||||
|
|
||||||
# find all broken symlinks
|
# find all broken symlinks
|
||||||
sympath = "/var/www"
|
sympath = "/var/www"
|
||||||
@@ -1503,8 +1505,16 @@ def copyWildcardCert(self, wo_domain_name, wo_root_domain):
|
|||||||
if os.path.isfile("/var/www/{0}/conf/nginx/ssl.conf"
|
if os.path.isfile("/var/www/{0}/conf/nginx/ssl.conf"
|
||||||
.format(wo_root_domain)):
|
.format(wo_root_domain)):
|
||||||
try:
|
try:
|
||||||
WOFileUtils.create_symlink(self, ["/var/www/{0}/conf/nginx/"
|
if not os.path.isdir("/etc/letsencrypt/shared"):
|
||||||
"ssl.conf"
|
WOFileUtils.mkdir(self, "/etc/letsencrypt/shared")
|
||||||
|
if not os.path.isfile("/etc/letsencrypt/shared/{0}.conf"
|
||||||
|
.format(wo_root_domain)):
|
||||||
|
WOFileUtils.copyfile("/var/www/{0}/conf/nginx/ssl.conf"
|
||||||
|
.format(wo_root_domain),
|
||||||
|
"/etc/letsencrypt/shared/{0}.conf"
|
||||||
|
.format(wo_root_domain))
|
||||||
|
WOFileUtils.create_symlink(self, ["/etc/letsencrypt/shared/"
|
||||||
|
"{0}.conf"
|
||||||
.format(wo_root_domain),
|
.format(wo_root_domain),
|
||||||
'/var/www/{0}/conf/nginx/'
|
'/var/www/{0}/conf/nginx/'
|
||||||
'ssl.conf'
|
'ssl.conf'
|
||||||
|
|||||||
Reference in New Issue
Block a user