fix(cr): migrate previous `access_log` and `error_log` paths using the previous behavior

pull/399/head
Kobi Meirson 2022-11-05 16:49:20 +02:00
parent fe523c0edc
commit 269b34a821
No known key found for this signature in database
GPG Key ID: 5D66F732B037CDE1
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ const migrateLogging = data => {
const perDomainAccessLogEnabled = !!perDomainLogging.accessLog;
if (perDomainAccessLogEnabled) {
accessLogEnabled = true;
accessLogPath = `/var/log/nginx/${perDomainServer.domain}.access.log`;
accessLogPath = accessLogPath.replace(/([^/]+)\.log$/, `${perDomainServer.domain}.$1.log`);
}
// error_log
@ -77,7 +77,7 @@ const migrateLogging = data => {
const perDomainErrorLogEnabled = !!perDomainLogging.errorLog;
if (perDomainErrorLogEnabled) {
errorLogEnabled = true;
errorLogPath = `/var/log/nginx/${perDomainServer.domain}.error.log`;
errorLogPath = errorLogPath.replace(/([^/]+)\.log$/, `${perDomainServer.domain}.$1.log`);
}
data.domains[key].logging = {