From 5a5e99149ecdbcc0d91896dd0b7ec9170629148d Mon Sep 17 00:00:00 2001 From: "a624669980@163.com" Date: Thu, 30 Jun 2022 18:58:43 +0800 Subject: [PATCH] update update.sh --- route/init.go | 2 +- shell/{upload.sh => update.sh} | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) rename shell/{upload.sh => update.sh} (97%) diff --git a/route/init.go b/route/init.go index 1444ff5..0626f36 100644 --- a/route/init.go +++ b/route/init.go @@ -203,7 +203,7 @@ func CheckSerialDiskMount() { func Update2_3() { command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") if !file.CheckNotExist("/casaOS") { - command.OnlyExec("source /casaOS/server/shell/upload.sh ;") + command.OnlyExec("source /casaOS/server/shell/update.sh ;") } command.OnlyExec("source /casaOS/server/shell/delete-old-service.sh ;") } diff --git a/shell/upload.sh b/shell/update.sh similarity index 97% rename from shell/upload.sh rename to shell/update.sh index d9b9415..b5c6ee9 100644 --- a/shell/upload.sh +++ b/shell/update.sh @@ -3,8 +3,8 @@ # @Author: LinkLeong link@icewhale.com # @Date: 2022-06-30 10:08:33 # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-30 18:13:17 - # @FilePath: /CasaOS/shell/move.sh + # @LastEditTime: 2022-06-30 18:57:26 + # @FilePath: /CasaOS/shell/update.sh # @Description: ### @@ -88,6 +88,10 @@ Check_Exist() { Show 2 "Start cleaning up the old version." + ${sudo_cmd} rm -rf /usr/lib/systemd/system/casaos.service + + ${sudo_cmd} rm -rf /lib/systemd/system/casaos.service + if [[ -f "/casaOS/server/conf/conf.ini" ]]; then ${sudo_cmd} cp -rf /casaOS/server/conf/conf.ini ${CASA_CONF_PATH} ${sudo_cmd} cp -rf /casaOS/server/conf/*.json ${CASA_USER_CONF_PATH}