From a01a7d614e0b4dcdf45c6133c46a970c8ea364ee Mon Sep 17 00:00:00 2001 From: "a624669980@163.com" Date: Thu, 30 Jun 2022 19:34:27 +0800 Subject: [PATCH] update update.sh --- route/init.go | 3 ++- shell/delete-old-service.sh | 6 +++--- shell/update.sh | 6 +----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/route/init.go b/route/init.go index a0bc663..6967c7f 100644 --- a/route/init.go +++ b/route/init.go @@ -204,8 +204,9 @@ func ShellInit() { command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") if !file.CheckNotExist("/casaOS") { command.OnlyExec("source /casaOS/server/shell/update.sh ;") + command.OnlyExec("source " + config.AppInfo.ShellPath + "/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 fb04004..30ea995 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 19:18:35 + # @LastEditTime: 2022-06-30 19:34:04 # @FilePath: /CasaOS/shell/delete-old-service.sh # @Description: ### @@ -98,8 +98,8 @@ Check_Exist() { if [[ -d "/casaOS" ]]; then ${sudo_cmd} rm -rf /casaOS fi - Show 0 "Clearance completed." - + Show 0 "Clearance completed." + $sudo_cmd systemctl restart ${CASA_BIN} } Check_Exist diff --git a/shell/update.sh b/shell/update.sh index b5c6ee9..4e2215b 100644 --- a/shell/update.sh +++ b/shell/update.sh @@ -3,7 +3,7 @@ # @Author: LinkLeong link@icewhale.com # @Date: 2022-06-30 10:08:33 # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-30 18:57:26 + # @LastEditTime: 2022-06-30 19:20:10 # @FilePath: /CasaOS/shell/update.sh # @Description: ### @@ -101,10 +101,6 @@ Check_Exist() { ${sudo_cmd} cp -rf /casaOS/server/db/* ${CASA_DB_PATH} fi - #Clean - if [[ -d "/casaOS" ]]; then - ${sudo_cmd} rm -rf /casaOS - fi Show 0 "Clearance completed." }