[agent][shell] - fix bug
This commit is contained in:
@@ -363,6 +363,8 @@ ExecStop=/bin/kill -15 \$MAINPID
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
colorEcho ${BLUE} "开始配置Agent日志输出文件!"
|
||||||
# https://www.benzhu.xyz/linux12/
|
# https://www.benzhu.xyz/linux12/
|
||||||
cat >/etc/rsyslog.d/octopus-agent.conf <<EOF
|
cat >/etc/rsyslog.d/octopus-agent.conf <<EOF
|
||||||
if \$programname == 'octopus-agent' then /var/log/octopus-agent.log
|
if \$programname == 'octopus-agent' then /var/log/octopus-agent.log
|
||||||
@@ -405,7 +407,7 @@ BootUPAgent() {
|
|||||||
|
|
||||||
FunctionStart
|
FunctionStart
|
||||||
|
|
||||||
colorEcho $BLUE "prepare the env"
|
colorEcho $BLUE "开始配置Agent启动的基础环境信息!"
|
||||||
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
|
||||||
|
|
||||||
@@ -416,12 +418,12 @@ BootUPAgent() {
|
|||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
systemctl enable octopus-agent.service
|
systemctl enable octopus-agent.service
|
||||||
systemctl start octopus-agent.service
|
systemctl restart octopus-agent.service
|
||||||
|
|
||||||
#
|
#
|
||||||
# systemctl restart octopus-agent.service
|
# systemctl restart octopus-agent.service
|
||||||
# systemctl status octopus-agent.service -l
|
# systemctl status octopus-agent.service -l
|
||||||
#tail -f 500 /var/log/octopus-agent.log
|
#tail -f -n 1500 /var/log/octopus-agent.log
|
||||||
|
|
||||||
FunctionSuccess
|
FunctionSuccess
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
@@ -636,7 +638,8 @@ main() {
|
|||||||
|
|
||||||
InstallJDKPackage 11
|
InstallJDKPackage 11
|
||||||
|
|
||||||
CleanOldOctopusAgent
|
# 不能使用下面的内容,会导致命令行执行的时候,本更新进程也会被杀死
|
||||||
|
# CleanOldOctopusAgent
|
||||||
|
|
||||||
DownloadAllFile
|
DownloadAllFile
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user