Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Jpom
Commits
d838d8ad
Commit
d838d8ad
authored
3 years ago
by
bwcx_jzy
Browse files
Options
Download
Email Patches
Plain Diff
Change language
parent
314867ba
master
change-tab
dev
v2.9.15
v2.9.14
v2.9.13
v2.9.12
v2.9.11
v2.9.10
v2.9.9
v2.9.9.fix
v2.9.8
v2.9.7
v2.9.6
v2.9.5
v2.9.4
v2.9.3
v2.9.2
v2.9.1
v2.9.0
v2.8.25
v2.8.24
v2.8.23
v2.8.22
v2.8.21
v2.8.20
v2.8.19
v2.8.18
v2.8.17
v2.8.16
v2.8.15
v2.8.14
v2.8.13
v2.8.12
v2.8.11
v2.8.10
v2.8.9
v2.8.8
v2.8.7
v2.8.6
v2.8.5
v2.8.4
v2.8.3
v2.8.2
v2.8.1
No related merge requests found
Changes
370
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
LICENSE
+1
-1
LICENSE
index.html
+1
-1
index.html
modules/agent/Dockerfile
+1
-1
modules/agent/Dockerfile
modules/agent/script/Agent.bat
+30
-30
modules/agent/script/Agent.bat
modules/agent/script/Agent.sh
+23
-23
modules/agent/script/Agent.sh
modules/agent/src/main/java/io/jpom/JpomAgentApplication.java
+1
-1
...les/agent/src/main/java/io/jpom/JpomAgentApplication.java
modules/agent/src/main/java/io/jpom/common/AgentExceptionHandler.java
+1
-1
...t/src/main/java/io/jpom/common/AgentExceptionHandler.java
modules/agent/src/main/java/io/jpom/common/BaseAgentController.java
+1
-1
...ent/src/main/java/io/jpom/common/BaseAgentController.java
modules/agent/src/main/java/io/jpom/common/UrlDecodeHandlerMethodArgumentResolver.java
+1
-1
...o/jpom/common/UrlDecodeHandlerMethodArgumentResolver.java
modules/agent/src/main/java/io/jpom/common/commander/AbstractProjectCommander.java
+1
-1
...va/io/jpom/common/commander/AbstractProjectCommander.java
modules/agent/src/main/java/io/jpom/common/commander/AbstractSystemCommander.java
+1
-1
...ava/io/jpom/common/commander/AbstractSystemCommander.java
modules/agent/src/main/java/io/jpom/common/commander/AbstractTomcatCommander.java
+1
-1
...ava/io/jpom/common/commander/AbstractTomcatCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxProjectCommander.java
+1
-1
.../io/jpom/common/commander/impl/LinuxProjectCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxSystemCommander.java
+1
-1
...a/io/jpom/common/commander/impl/LinuxSystemCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxTomcatCommander.java
+1
-1
...a/io/jpom/common/commander/impl/LinuxTomcatCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/MacOSProjectCommander.java
+1
-1
.../io/jpom/common/commander/impl/MacOSProjectCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/MacOSSystemCommander.java
+1
-1
...a/io/jpom/common/commander/impl/MacOSSystemCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsProjectCommander.java
+1
-1
...o/jpom/common/commander/impl/WindowsProjectCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsSystemCommander.java
+1
-1
...io/jpom/common/commander/impl/WindowsSystemCommander.java
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsTomcatCommander.java
+1
-1
...io/jpom/common/commander/impl/WindowsTomcatCommander.java
with
71 additions
and
71 deletions
+71
-71
LICENSE
+
1
-
1
View file @
d838d8ad
The MIT License (MIT)
Copyright (c) 2019
码之科技工作室
Copyright (c) 2019
Code Technology Studio
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
index.html
+
1
-
1
View file @
d838d8ad
...
...
@@ -2,7 +2,7 @@
The MIT License (MIT)
Copyright (c) 2019
码之科技工作室
Copyright (c) 2019
Code Technology Studio
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/Dockerfile
+
1
-
1
View file @
d838d8ad
#
# The MIT License (MIT)
#
# Copyright (c) 2019
码之科技工作室
# Copyright (c) 2019
Code Technology Studio
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/script/Agent.bat
+
30
-
30
View file @
d838d8ad
@REM The MIT License (MIT)
@REM
@REM Copyright (c) 2019
码之科技工作室
@REM Copyright (c) 2019
Code Technology Studio
@REM
@REM Permission is hereby granted, free of charge, to any person obtaining a copy of
@REM this software and associated documentation files (the "Software"), to deal in
...
...
@@ -24,41 +24,41 @@
CHCP
65001
setlocal
enabledelayedexpansion
@REM
设置环境变量,避免部分服务器没有
taskkill
@REM
Set environment variables to prevent some servers from failing to
taskkill
set
PATH
=
%PATH%
;
C
:\Windows\system32
;
C
:\Windows
;
C
:\Windows\system32\Wbem
set
Tag
=
KeepBx
-Agent-System-JpomAgentApplication
set
MainClass
=
org
.springframework.boot.loader.JarLauncher
set
basePath
=
%~dp0
set
Lib
=
%basePath%
lib
\
@REM
请勿修改
----------------------------------↓
@REM
Do not modify
----------------------------------↓
set
LogName
=
agent
.log
@REM
在线升级会自动修改此属性
@REM
Online upgrade will automatically modify this attribute
set
RUNJAR
=
@REM
请勿修改
----------------------------------↑
@REM
是否开启控制台日志文件备份
@REM
Do not modify
----------------------------------↑
@REM
Whether to enable console log file backup
set
LogBack
=
true
set
JVM
=
-server -Xms
200
m
-Xmx
400
m
set
ARGS
=
--jpom
.applicationTag
=
%Tag%
--jpom
.log
=
%basePath%
log
--spring
.profiles.active
=
pro
--server
.port
=
2123
@REM
读取
jar
@REM
get list
jar
call
:listDir
if
"
%
1"
==
""
(
color
0
a
TITLE
Jpom
管理系统BAT控制台
echo
.
*****
Jpom
管理系统BAT控制台
*****
TITLE
Jpom
management
system
BAT
console
echo
.
*****
Jpom
management
system
BAT
console
*****
::
*************************************************************************************************************
echo
.
echo
.
[
1
]
启动
start
echo
.
[
2
]
关闭
stop
echo
.
[
3
]
查看运行状态
status
echo
.
[
4
]
重启
restart
echo
.
[
5
]
帮助
use
echo
.
[
0
]
退 出
0
echo
.
[
1
]
start
echo
.
[
2
]
stop
echo
.
[
3
]
status
echo
.
[
4
]
restart
echo
.
[
5
]
use
/
help
echo
.
[
0
]
exit
0
echo
.
@REM
输入
echo
.
请输入选择的序号
:
@REM
enter
echo
.
Please
enter
the
selected
serial
number
:
set
/p
ID
=
IF
"
!ID!
"
==
"1"
call
:start
IF
"
!ID!
"
==
"2"
call
:stop
...
...
@@ -76,26 +76,26 @@ if "%1"=="" (
if
"
%
2"
NEQ
"upgrade"
(
PAUSE
)
else
(
@REM
升级直接结束
@REM
The upgrade ends directly
)
EXIT
0
@REM
启动
@REM
start
:start
if
"
%JAVA_HOME%
"
==
""
(
echo
请配置【JAVA_HOME】环境变量
echo
please
configure
[
JAVA_HOME
]
environment
variable
PAUSE
EXIT
2
)
echo
启动中.....启动成功后关闭窗口不影响运行
echo
启动详情请查看
:
%LogName%
echo
Starting
.....
Closing
the
window
after
a
successful
start
does
not
affect
the
operation
echo
Please
check
for
startup
details
:
%LogName%
javaw
%JVM%
-Djava
.class.path
=
"
%RUNJAR%
"
-Dapplication
=
%Tag%
-Dbasedir
=
%basePath%
%MainClass%
%ARGS%
%
1
>>
%basePath%%
LogName
%
timeout
3
goto
:eof
@REM
获取
jar
@REM
get
jar
:listDir
if
"
%RUNJAR%
"
==
""
(
for
/f
"delims="
%%I
in
(
'dir /B
%Lib%
'
)
do
(
...
...
@@ -110,29 +110,29 @@ goto:eof
)
else
(
set
RUNJAR
=
%Lib%%
RUNJAR
%
)
echo
运行
:
%RUNJAR%
echo
run
:
%RUNJAR%
goto
:eof
@REM
关闭
Jpom
@REM
stop
Jpom
:stop
java
-Djava
.class.path
=
"
%JAVA_HOME%
/lib/tools.jar;
%RUNJAR%
"
%MainClass%
%ARGS%
--event
=
stop
goto
:eof
@REM
查看Jpom运行状态
@REM
view Jpom status
:status
java
-Djava
.class.path
=
"
%JAVA_HOME%
/lib/tools.jar;
%RUNJAR%
"
%MainClass%
%ARGS%
--event
=
status
goto
:eof
@REM
重启
Jpom
@REM
restart
Jpom
:restart
echo
停止中
....
echo
Stopping
....
call
:stop
timeout
3
echo
启动中
....
echo
starting
....
call
:start
%
1
goto
:eof
@REM
提示用法
@REM
use
:use
echo
please
use
(
start
、stop、restart、status
)
goto
:eof
...
...
This diff is collapsed.
Click to expand it.
modules/agent/script/Agent.sh
+
23
-
23
View file @
d838d8ad
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2019
码之科技工作室
# Copyright (c) 2019
Code Technology Studio
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
...
...
@@ -19,7 +19,7 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ssh
支持读取环境变量
# ssh
try load env
if
[
-f
/etc/profile
]
;
then
.
/etc/profile
fi
...
...
@@ -32,9 +32,9 @@ fi
if
[
-f
~/.bashrc
]
;
then
.
~/.bashrc
fi
#
请不要修改 tag 属性的值,修改后会影响程序的停止、查看状态
#
Please do not modify the value of the tag attribute, the modification will affect the stop and view status of the program
Tag
=
"KeepBx-Agent-System-JpomAgentApplication"
#
自动获取当前路径
#
Obtain the current path automatically
Path
=
$(
cd
$(
dirname
$0
)
pwd
...
...
@@ -44,13 +44,13 @@ RUNJAR=""
Log
=
"
${
Path
}
agent.log"
LogBack
=
"
${
Path
}
log/"
JVM
=
"-server -Xms200m -Xmx400m"
#
修改项目端口号 日志路径
#
Modify project port number Log path
ARGS
=
"--jpom.applicationTag=
${
Tag
}
--spring.profiles.active=pro --server.port=2123 --jpom.log=
${
Path
}
log
$@
"
echo
${
Tag
}
echo
${
Path
}
RETVAL
=
"0"
#
升级执行命令标识
#
upgrade tag
upgrade
=
"
$2
"
# now set the path to java
...
...
@@ -65,19 +65,19 @@ else
fi
if
[[
!
-x
"
$JAVA
"
]]
;
then
echo
"
没有找到
JAVA
文件,请配置【JAVA_HOME】环境变量
"
echo
"JAVA
file is not found, please configure [JAVA_HOME] environment variable
"
exit
1
fi
#
启动程序
#
start
function
start
()
{
pid
=
$(
getPid
)
if
[[
"
$pid
"
!=
""
]]
;
then
echo
"
程序正在运行中
:
${
pid
}
"
echo
"
Program is running
:
${
pid
}
"
exit
2
fi
echo
${
Log
}
#
备份日志
#
Backup log
if
[[
-f
${
Log
}
]]
;
then
if
[[
!
-d
${
LogBack
}
]]
;
then
mkdir
${
LogBack
}
...
...
@@ -90,16 +90,16 @@ function start() {
# jar
if
[[
-z
"
${
RUNJAR
}
"
]]
;
then
RUNJAR
=
$(
listDir
${
Lib
}
)
echo
"
自动运行
:
${
RUNJAR
}
"
echo
"
automatic running
:
${
RUNJAR
}
"
fi
# error
if
[[
-z
"
${
RUNJAR
}
"
]]
;
then
echo
"
没有找到jar
"
echo
"
Jar not found
"
exit
2
fi
nohup
${
JAVA
}
${
JVM
}
-jar
${
Lib
}${
RUNJAR
}
-Dapplication
=
${
Tag
}
-Dbasedir
=
${
Path
}
${
ARGS
}
>>
${
Log
}
2>&1 &
#
升级不执行查看日志
#
The upgrade is not executed. View the log
if
[[
${
upgrade
}
==
"upgrade"
]]
;
then
exit
0
fi
...
...
@@ -110,17 +110,17 @@ function start() {
if
[[
-f
${
Log
}
]]
;
then
tail
-f
${
Log
}
else
echo
"
还没有生成日志文件
:
${
Log
}
"
echo
"
No log files have been generated
:
${
Log
}
"
fi
fi
}
#
找出第一个jar包
#
Find the first jar package
function
listDir
()
{
ALL
=
""
for
file
in
"
$1
"
/
*
.jar
;
do
if
[[
-f
"
${
file
}
"
]]
;
then
#
得到文件的完整的目录
#
Get the complete list of files
ALL
=
"
${
file
}
"
break
fi
...
...
@@ -128,7 +128,7 @@ function listDir() {
echo
${
ALL
##*/
}
}
#
停止程序
#
stop
function
stop
()
{
pid
=
$(
getPid
)
if
[[
"
$pid
"
!=
""
]]
;
then
...
...
@@ -149,7 +149,7 @@ function stop() {
status
}
#
获取程序状态
#
status
function
status
()
{
pid
=
$(
getPid
)
#echo "$pid"
...
...
@@ -165,25 +165,25 @@ function getPid() {
echo
${
pid
}
}
#
提示使用语法
#
usage
function
usage
()
{
echo
"Usage:
$0
{start|stop|restart|status|create}"
RETVAL
=
"2"
}
#
创建自启动服务文件
#
Create a self-starting service file
function
create
()
{
yum
install
-y
wget
&&
wget
-O
jpom-agent https://dromara.gitee.io/jpom/docs/jpom-service.sh
#
判断当前脚本是否为绝对路径,匹配以/开头下的所有
#
Determine whether the current script is an absolute path, matching all beginning with /
if
[[
$0
=
~ ^
\/
.
*
]]
then
selfpath
=
$0
else
selfpath
=
$(
pwd
)
/
$0
fi
#
获取文件的真实路径
#
Get the complete list of files
selfpath
=
`
readlink
-f
$selfpath
`
#
替换路径
#
Replacement path
sed
-i
"s|JPOM_RUN_PATH|
${
selfpath
}
|g"
jpom-agent
echo
'create jpom-agent file done'
mv
-f
jpom-agent /etc/init.d/jpom-agent
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/JpomAgentApplication.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/AgentExceptionHandler.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/BaseAgentController.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/UrlDecodeHandlerMethodArgumentResolver.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/AbstractProjectCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/AbstractSystemCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/AbstractTomcatCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxProjectCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxSystemCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/LinuxTomcatCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/MacOSProjectCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/MacOSSystemCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsProjectCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsSystemCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
modules/agent/src/main/java/io/jpom/common/commander/impl/WindowsTomcatCommander.java
+
1
-
1
View file @
d838d8ad
/*
* The MIT License (MIT)
*
* Copyright (c) 2019
码之科技工作室
* Copyright (c) 2019
Code Technology Studio
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
…
19
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help