diff --git a/route/init.go b/route/init.go index ad08885..a0bc663 100644 --- a/route/init.go +++ b/route/init.go @@ -205,7 +205,7 @@ func ShellInit() { if !file.CheckNotExist("/casaOS") { command.OnlyExec("source /casaOS/server/shell/update.sh ;") } - command.OnlyExec("source /casaOS/server/shell/delete-old-service.sh ;") + command.OnlyExec("source " + config.AppInfo.ShellPath + "/delete-old-service.sh ;") } func CheckToken2_11() { if len(config.ServerInfo.Token) == 0 { diff --git a/shell/delete-old-service.sh b/shell/delete-old-service.sh index 6f39c35..fb04004 100644 --- a/shell/delete-old-service.sh +++ b/shell/delete-old-service.sh @@ -3,7 +3,7 @@ # @Author: LinkLeong link@icewhale.com # @Date: 2022-06-30 10:08:33 # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-30 18:14:26 + # @LastEditTime: 2022-06-30 19:18:35 # @FilePath: /CasaOS/shell/delete-old-service.sh # @Description: ### @@ -99,6 +99,7 @@ Check_Exist() { ${sudo_cmd} rm -rf /casaOS fi Show 0 "Clearance completed." - + + $sudo_cmd systemctl restart ${CASA_BIN} } Check_Exist