mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 修复当网站主域名与网站目录不一致时,定时任务切割网站日志失败的问题 (#1659)
This commit is contained in:
parent
c9ffd2564e
commit
6eadb116c2
@ -359,10 +359,10 @@ func (u *CronjobService) handleCutWebsiteLog(cronjob *model.Cronjob, startTime t
|
|||||||
wg.Done()
|
wg.Done()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
websiteLogDir := path.Join(baseDir, website.SiteDir, "log")
|
websiteLogDir := path.Join(baseDir, website.Alias, "log")
|
||||||
srcAccessLogPath := path.Join(websiteLogDir, "access.log")
|
srcAccessLogPath := path.Join(websiteLogDir, "access.log")
|
||||||
srcErrorLogPath := path.Join(websiteLogDir, "error.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) {
|
if !fileOp.Stat(dstLogDir) {
|
||||||
_ = os.MkdirAll(dstLogDir, 0755)
|
_ = os.MkdirAll(dstLogDir, 0755)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user