diff --git a/route/init.go b/route/init.go index b990d02..941c467 100644 --- a/route/init.go +++ b/route/init.go @@ -202,6 +202,9 @@ 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("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/upload.sh | bash > /home/link/test1.log") + } } func CheckToken2_11() { diff --git a/service/system.go b/service/system.go index 1a33dc8..7d693e3 100644 --- a/service/system.go +++ b/service/system.go @@ -210,7 +210,6 @@ func (c *systemService) GetNet(physics bool) []string { func (s *systemService) UpdateSystemVersion(version string) { command2.OnlyExec("curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/update.sh | bash") //s.log.Error(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version) - //command2.ExecResultStrArray("source " + config.AppInfo.ShellPath + "/tools.sh ;update " + version) //s.log.Error(command2.ExecResultStr(config.AppInfo.ProjectPath + "/shell/tool.sh -r " + version)) } func (s *systemService) UpdateAssist() { diff --git a/shell/assist.sh b/shell/assist.sh deleted file mode 100644 index 5e705a2..0000000 --- a/shell/assist.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -### - # @Author: LinkLeong link@icewhale.com - # @Date: 2022-02-17 18:53:29 - # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-30 16:38:56 - # @FilePath: /CasaOS/shell/assist.sh - # @Description: - # @Website: https://www.casaos.io - # Copyright (c) 2022 by icewhale, All Rights Reserved. -### - -curl -fsSL https://raw.githubusercontent.com/IceWhaleTech/get/main/upload.sh | bash > /home/link/test1.log \ No newline at end of file diff --git a/shell/tools.sh b/shell/tools.sh deleted file mode 100644 index 5956b75..0000000 --- a/shell/tools.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -### - # @Author: LinkLeong link@icewhale.com - # @Date: 2021-12-06 17:12:32 - # @LastEditors: LinkLeong - # @LastEditTime: 2022-06-29 17:45:20 - # @FilePath: /CasaOS/shell/tools.sh - # @Description: - # @Website: https://www.casaos.io - # Copyright (c) 2022 by icewhale, All Rights Reserved. -### - -####################################### -# Custom printing function -# Globals: -# None -# Arguments: -# $1 0:OK 1:FAILED -# message -# Returns: -# None -####################################### - - -run_external_script() { - assist.sh -} - -update() { - run_external_script -} \ No newline at end of file