[ agent ] [ boot ] - agent boot up procedure - 12
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
##### environment variables ######
|
##### 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=(
|
DependLibFiles=(
|
||||||
wdd-lib-file.sh
|
wdd-lib-file.sh
|
||||||
wdd-lib-log.sh
|
wdd-lib-log.sh
|
||||||
@@ -198,7 +198,7 @@ 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
|
||||||
|
wget https://happybirthday.107421.xyz/octopus-agent/octopus-agent-2022-12-21-16-00-00.jar -O /octopus-agent/agent.jar
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
@@ -264,7 +264,7 @@ InstallJDKPackage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
systemdAgent(){
|
systemdAgent(){
|
||||||
local JAVA_OPTS=""
|
local JAVA_OPTS="-Xms128m -Xmx256m"
|
||||||
|
|
||||||
cat >/etc/systemd/system/octopus-agent.service <<EOF
|
cat >/etc/systemd/system/octopus-agent.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -316,15 +316,14 @@ BootUPAgent(){
|
|||||||
chmod +x $OctopusAgentPath/lib/wdd-lib-env.sh
|
chmod +x $OctopusAgentPath/lib/wdd-lib-env.sh
|
||||||
$OctopusAgentPath/lib/wdd-lib-env.sh
|
$OctopusAgentPath/lib/wdd-lib-env.sh
|
||||||
|
|
||||||
|
|
||||||
colorEcho $BLUE "start to daemon the agent pid"
|
colorEcho $BLUE "start to daemon the agent pid"
|
||||||
systemdAgent
|
systemdAgent
|
||||||
|
|
||||||
|
|
||||||
colorEcho $BLUE "start the agent!"
|
colorEcho $BLUE "start the agent!"
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start octopus-agent.service
|
|
||||||
systemctl enable octopus-agent.service
|
systemctl enable octopus-agent.service
|
||||||
|
systemctl start octopus-agent.service
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
@@ -345,7 +344,6 @@ main(){
|
|||||||
|
|
||||||
BootUPAgent
|
BootUPAgent
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user