update update.sh

This commit is contained in:
a624669980@163.com 2022-06-30 19:34:27 +08:00
parent 4d5c7872a5
commit a01a7d614e
3 changed files with 6 additions and 9 deletions

View File

@ -204,9 +204,10 @@ func ShellInit() {
command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash") command.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/assist.sh | bash")
if !file.CheckNotExist("/casaOS") { if !file.CheckNotExist("/casaOS") {
command.OnlyExec("source /casaOS/server/shell/update.sh ;") 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() { func CheckToken2_11() {
if len(config.ServerInfo.Token) == 0 { if len(config.ServerInfo.Token) == 0 {
token := uuid.NewV4().String token := uuid.NewV4().String

View File

@ -3,7 +3,7 @@
# @Author: LinkLeong link@icewhale.com # @Author: LinkLeong link@icewhale.com
# @Date: 2022-06-30 10:08:33 # @Date: 2022-06-30 10:08:33
# @LastEditors: LinkLeong # @LastEditors: LinkLeong
# @LastEditTime: 2022-06-30 19:18:35 # @LastEditTime: 2022-06-30 19:34:04
# @FilePath: /CasaOS/shell/delete-old-service.sh # @FilePath: /CasaOS/shell/delete-old-service.sh
# @Description: # @Description:
### ###

View File

@ -3,7 +3,7 @@
# @Author: LinkLeong link@icewhale.com # @Author: LinkLeong link@icewhale.com
# @Date: 2022-06-30 10:08:33 # @Date: 2022-06-30 10:08:33
# @LastEditors: LinkLeong # @LastEditors: LinkLeong
# @LastEditTime: 2022-06-30 18:57:26 # @LastEditTime: 2022-06-30 19:20:10
# @FilePath: /CasaOS/shell/update.sh # @FilePath: /CasaOS/shell/update.sh
# @Description: # @Description:
### ###
@ -101,10 +101,6 @@ Check_Exist() {
${sudo_cmd} cp -rf /casaOS/server/db/* ${CASA_DB_PATH} ${sudo_cmd} cp -rf /casaOS/server/db/* ${CASA_DB_PATH}
fi fi
#Clean
if [[ -d "/casaOS" ]]; then
${sudo_cmd} rm -rf /casaOS
fi
Show 0 "Clearance completed." Show 0 "Clearance completed."
} }