2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 17:07:18 +08:00

fix(cron): backup path

This commit is contained in:
耗子
2023-07-28 03:47:43 +08:00
parent f5a6f17108
commit 614a5f15b5

View File

@@ -75,7 +75,10 @@ func (c *CronController) Add(ctx http.Context) {
if backupType == "website" {
backupName = ctx.Request().Input("website")
}
backupPath := ctx.Request().Input("backup_path", c.setting.Get(models.SettingKeyBackupPath)+"/"+backupType)
backupPath := ctx.Request().Input("backup_path")
if len(backupName) == 0 {
backupPath = c.setting.Get(models.SettingKeyBackupPath) + "/" + backupType
}
backupSave := ctx.Request().InputInt("save", 10)
shell = `#!/bin/bash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH