[ agent ] [ boot ] - agent boot up procedure - 12

This commit is contained in:
IceDerce
2022-12-22 20:35:25 +08:00
parent a7a86ceb0a
commit c32a858913

View File

@@ -2,7 +2,7 @@
##### environment variables ######
RepoSourcePath=https://github.com/zeaslity/ProjectOctopus/blob/master/source/src/main/java/io/wdd/source/shell
RepoSourcePath=https://raw.githubusercontent.com/zeaslity/ProjectOctopus/main/source/src/main/java/io/wdd/source/shell
DependLibFiles=(
wdd-lib-file.sh
wdd-lib-log.sh
@@ -198,7 +198,7 @@ DownloadAllFile() {
colorEcho $BLUE "start to download octopus agent !"
# check for latest version
# download the lasted jar
wget https://happybirthday.107421.xyz/octopus-agent/octopus-agent-2022-12-21-16-00-00.jar -O /octopus-agent/agent.jar
FunctionSuccess
FunctionEnd
@@ -264,7 +264,7 @@ InstallJDKPackage() {
}
systemdAgent(){
local JAVA_OPTS=""
local JAVA_OPTS="-Xms128m -Xmx256m"
cat >/etc/systemd/system/octopus-agent.service <<EOF
[Unit]
@@ -316,15 +316,14 @@ BootUPAgent(){
chmod +x $OctopusAgentPath/lib/wdd-lib-env.sh
$OctopusAgentPath/lib/wdd-lib-env.sh
colorEcho $BLUE "start to daemon the agent pid"
systemdAgent
colorEcho $BLUE "start the agent!"
systemctl daemon-reload
systemctl start octopus-agent.service
systemctl enable octopus-agent.service
systemctl start octopus-agent.service
FunctionSuccess
FunctionEnd
@@ -345,7 +344,6 @@ main(){
BootUPAgent
}