feat: 修复当网站主域名与网站目录不一致时,定时任务切割网站日志失败的问题 (#1659)

pull/1666/head
zhengkunwang 1 year ago committed by GitHub
parent c9ffd2564e
commit 6eadb116c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -359,10 +359,10 @@ func (u *CronjobService) handleCutWebsiteLog(cronjob *model.Cronjob, startTime t
wg.Done()
return
}
websiteLogDir := path.Join(baseDir, website.SiteDir, "log")
websiteLogDir := path.Join(baseDir, website.Alias, "log")
srcAccessLogPath := path.Join(websiteLogDir, "access.log")
srcErrorLogPath := path.Join(websiteLogDir, "error.log")
dstLogDir := path.Join(global.CONF.System.Backup, "log", "website", website.PrimaryDomain)
dstLogDir := path.Join(global.CONF.System.Backup, "log", "website", website.Alias)
if !fileOp.Stat(dstLogDir) {
_ = os.MkdirAll(dstLogDir, 0755)
}

Loading…
Cancel
Save