[ server ] [ executor ] - optimize code -3
This commit is contained in:
@@ -2,11 +2,11 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: octopus-agent
|
name: octopus-agent
|
||||||
profiles:
|
profiles:
|
||||||
active: k3s
|
active: local
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
config:
|
config:
|
||||||
group: k3s
|
group: local
|
||||||
config-retry-time: 3000
|
config-retry-time: 3000
|
||||||
file-extension: yaml
|
file-extension: yaml
|
||||||
max-retry: 3
|
max-retry: 3
|
||||||
@@ -16,7 +16,7 @@ spring:
|
|||||||
timeout: 5000
|
timeout: 5000
|
||||||
config-long-poll-timeout: 5000
|
config-long-poll-timeout: 5000
|
||||||
extension-configs:
|
extension-configs:
|
||||||
- group: k3s
|
- group: local
|
||||||
data-id: common-k3s.yaml
|
data-id: common-local.yaml
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -200,8 +200,8 @@ DownloadAllFile() {
|
|||||||
colorEcho $BLUE "start to download octopus agent !"
|
colorEcho $BLUE "start to download octopus agent !"
|
||||||
# check for latest version
|
# check for latest version
|
||||||
# download the lasted jar
|
# download the lasted jar
|
||||||
. ./lib/wdd-lib-os.s
|
. ./lib/wdd-lib-os.sh
|
||||||
h
|
|
||||||
CheckAndDownloadLatestVersion
|
CheckAndDownloadLatestVersion
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
@@ -268,7 +268,7 @@ InstallJDKPackage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
systemdAgent(){
|
systemdAgent(){
|
||||||
local JAVA_OPTS="-Xms128m -Xmx512m"
|
local JAVA_OPTS="-Xms128m -Xmx512m -Dspring.spring.active=k3s -Dspring.cloud.nacos.config.extension-configs=[group=k3s,data-id=common-k3s.yaml]"
|
||||||
|
|
||||||
# https://www.baeldung.com/linux/run-java-application-as-service
|
# https://www.baeldung.com/linux/run-java-application-as-service
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ CheckAndDownloadLatestVersion
|
|||||||
|
|
||||||
|
|
||||||
if [[ ! -f /octopus-agent/agent-reboot.sh ]]; then\
|
if [[ ! -f /octopus-agent/agent-reboot.sh ]]; then\
|
||||||
warn "agent-bootup.sh not exist! start to download !"
|
warn "agent-bootup.sh not exist! start to download !"
|
||||||
cd /octopus-agent
|
cd /octopus-agent
|
||||||
wget $RepoSourcePath/agent-reboot.sh
|
wget $RepoSourcePath/agent-reboot.sh
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
#. /octopus-agent/shell/lib/wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||||
#. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
. /octopus-agent/shell/lib/wdd-lib-sys.sh
|
||||||
|
|
||||||
. ./wdd-lib-log.sh
|
#. .wdd-lib-log.sh
|
||||||
. ./wdd-lib-sys.sh
|
#. .wdd-lib-sys.sh
|
||||||
|
|
||||||
|
|
||||||
hostArchVersion=""
|
hostArchVersion=""
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
||||||
# Load Generic Libraries
|
# Load Generic Libraries
|
||||||
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.shwdd-lib-log.sh
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
. ./wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||||
|
|
||||||
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
OctopusAgentUrl=https://happybirthday.107421.xyz/octopus-agent/
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
. /octopus-agent/shell/lib/wdd-lib-log.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 判断命令是否存在
|
# 判断命令是否存在
|
||||||
command_exists() {
|
command_exists() {
|
||||||
command -v "$@" >/dev/null 2>&1
|
command -v "$@" >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user