From deca747ff32d348b6048ff3e60d337efb700be29 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Sun, 1 Jan 2023 11:21:13 +0500 Subject: [PATCH] further fix for: https://www.facebook.com/1828741036/videos/679000653934359/ --- plogical/backupUtilities.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plogical/backupUtilities.py b/plogical/backupUtilities.py index 28590baac..99d8f70ce 100755 --- a/plogical/backupUtilities.py +++ b/plogical/backupUtilities.py @@ -435,8 +435,14 @@ class backupUtilities: completPathToConf = f'{backupUtilities.Server_root}/conf/vhosts/{domainName}/vhost.conf' + ### If domain is suspended, this path wont exists, so please check for other + if os.path.exists(completPathToConf): copy(completPathToConf, tempStoragePath + '/vhost.conf') + else: + completPathToConf = f'{backupUtilities.Server_root}/conf/vhosts/{domainName}-suspended/vhost.conf' + if os.path.exists(completPathToConf): + copy(completPathToConf, tempStoragePath + '/vhost.conf') childDomains = backupMetaData.findall('ChildDomains/domain') @@ -450,8 +456,13 @@ class backupUtilities: completPathToConf = f'{backupUtilities.Server_root}/conf/vhosts/{actualChildDomain}/vhost.conf' if os.path.exists(completPathToConf): copy(completPathToConf, f'{tempStoragePath}/{actualChildDomain}.vhost.conf') + else: + completPathToConf = f'{backupUtilities.Server_root}/conf/vhosts/{actualChildDomain}-suspended/vhost.conf' + if os.path.exists(completPathToConf): + copy(completPathToConf, f'{tempStoragePath}/{actualChildDomain}.vhost.conf') - ### Storing SSL for child domainsa + + ### Storing SSL for child domainsa sslStoragePath = f'/etc/letsencrypt/live/{actualChildDomain}'