Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
datav_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
datav_platform
Commits
c923250f
Commit
c923250f
authored
Apr 21, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打包方式
parent
a7d8bc98
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
980 additions
and
31 deletions
+980
-31
assembly/assembly.xml
assembly/assembly.xml
+38
-0
datav-manager/db/db.sql
datav-manager/db/db.sql
+679
-0
datav-manager/db/init_data.sql
datav-manager/db/init_data.sql
+18
-0
datav-manager/pom.xml
datav-manager/pom.xml
+50
-11
datav-manager/src/main/bin/check_server.sh
datav-manager/src/main/bin/check_server.sh
+28
-0
datav-manager/src/main/bin/deploy.sh
datav-manager/src/main/bin/deploy.sh
+94
-0
datav-manager/src/main/bin/shutdown.sh
datav-manager/src/main/bin/shutdown.sh
+14
-14
datav-manager/src/main/bin/start.cmd
datav-manager/src/main/bin/start.cmd
+1
-0
datav-manager/src/main/bin/start.sh
datav-manager/src/main/bin/start.sh
+6
-6
datav-manager/src/main/bin/stop.sh
datav-manager/src/main/bin/stop.sh
+52
-0
No files found.
assembly/assembly.xml
0 → 100644
View file @
c923250f
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"
>
<id>
release
</id>
<formats>
<format>
tar.gz
</format>
</formats>
<fileSets>
<fileSet>
<directory>
target/bin
</directory>
<outputDirectory>
bin
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
${project.parent.basedir}/dist/${project.parent.artifactId}/boot
</directory>
<outputDirectory>
boot
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
./db
</directory>
<includes>
<include>
*.sql
</include>
</includes>
<outputDirectory>
db
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
target/${project.artifactId}-${project.version}.jar
</source>
<outputDirectory>
boot
</outputDirectory>
</file>
</files>
</assembly>
\ No newline at end of file
datav-manager/db/db.sql
View file @
c923250f
This diff is collapsed.
Click to expand it.
datav-manager/db/init_data.sql
0 → 100644
View file @
c923250f
INSERT
INTO
`mortals_xhx_user`
(
`loginName`
,
`loginPwd`
,
`loginPwd1`
,
`loginPwd2`
,
`loginPwd3`
,
`loginLimitAddress`
,
`realName`
,
`mobile`
,
`phone`
,
`email`
,
`qq`
,
`userType`
,
`siteId`
,
`status`
,
`customerId`
,
`createTime`
,
`createUserId`
,
`createUserName`
,
`lastLoginTime`
,
`lastLoginAddress`
,
`lastModPwdTime`
,
`lastModPwdAddr`
)
VALUES
(
'admin'
,
'43442676c74ae59f219c2d87fd6bad52'
,
NULL
,
NULL
,
NULL
,
NULL
,
'系统管理员'
,
'13808095770'
,
NULL
,
NULL
,
NULL
,
'1'
,
NULL
,
'1'
,
NULL
,
Now
(),
'1'
,
'admin'
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`mortals_xhx_customer`
(
`loginName`
,
`password`
,
`memberLevel`
,
`custName`
,
`organization`
,
`contactTelphone`
,
`enterpriseConsultant`
,
`siteId`
,
`sex`
,
`mailbox`
,
`job`
,
`avatar`
,
`customerSrc`
,
`status`
,
`createUserId`
,
`createTime`
,
`updateTime`
,
`lastLoginTime`
,
`lastLoginAddress`
)
VALUES
(
'gaowei'
,
'4280d89a5a03f812751f504cc10ee8a5'
,
'1'
,
'高维'
,
'四川恒升信达科技有限公司'
,
'13088088834'
,
'高维'
,
NULL
,
'1'
,
''
,
''
,
NULL
,
'2'
,
'1'
,
'1'
,
Now
(),
NULL
,
NULL
,
NULL
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'4'
,
'风景元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'2'
,
'美食元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-06-15 17:20:29'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'3'
,
'党政元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-06-15 18:19:36'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分类'
,
'PictureMaterial'
,
'pictureClassifyId'
,
'1'
,
'党建元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-06-15 18:19:36'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分类'
,
'PictureMaterial'
,
'pictureClassifyId'
,
'2'
,
'餐饮元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-06-15 18:32:17'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'5'
,
'新闻报道'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-07-12 16:21:57'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'7'
,
'政务服务'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-12 16:10:54'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'8'
,
'线、箭头'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-12 16:48:42'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'9'
,
'几何形状'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-12 16:51:19'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'10'
,
'人物插画'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-12 16:58:54'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'11'
,
'科技元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-15 11:14:24'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'12'
,
'节日元素'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-17 15:09:44'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'13'
,
'其他'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-17 15:18:22'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'14'
,
'数字'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-17 16:15:38'
,
'1'
,
'系统管理员'
);
INSERT
INTO
`mortals_xhx_param`
(
`name`
,
`firstOrganize`
,
`secondOrganize`
,
`paramKey`
,
`paramValue`
,
`validStatus`
,
`modStatus`
,
`displayType`
,
`remark`
,
`createTime`
,
`createUserId`
,
`createUserName`
)
VALUES
(
'素材分组'
,
'PictureMaterial'
,
'pictureGroupId'
,
'15'
,
'艺术字'
,
NULL
,
NULL
,
NULL
,
NULL
,
'2022-08-19 15:19:07'
,
'1'
,
'系统管理员'
);
datav-manager/pom.xml
View file @
c923250f
...
@@ -152,11 +152,6 @@
...
@@ -152,11 +152,6 @@
</resources>
</resources>
<plugins>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<artifactId>
maven-surefire-plugin
</artifactId>
...
@@ -168,11 +163,6 @@
...
@@ -168,11 +163,6 @@
<plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<outputDirectory>
${project.basedir}/dist/${project.artifactId}/boot
</outputDirectory>
<layout>
ZIP
</layout>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
@@ -196,10 +186,36 @@
...
@@ -196,10 +186,36 @@
</goals>
</goals>
<configuration>
<configuration>
<encoding>
UTF-8
</encoding>
<encoding>
UTF-8
</encoding>
<outputDirectory>
${project.basedir}/dist/${project.artifactId}/bin
</outputDirectory>
<outputDirectory>
target/bin
</outputDirectory>
<resources>
<resources>
<resource>
<resource>
<directory>
src/main/bin/
</directory>
<directory>
src/main/bin/
</directory>
<excludes>
<exclude>
deploy.sh
</exclude>
</excludes>
<filtering>
true
</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>
copy-deploy
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
</goals>
<configuration>
<encoding>
UTF-8
</encoding>
<outputDirectory>
${project.parent.basedir}/dist/${project.artifactId}/
</outputDirectory>
<resources>
<resource>
<directory>
src/main/bin
</directory>
<includes>
<include>
deploy.sh
</include>
</includes>
<filtering>
true
</filtering>
<filtering>
true
</filtering>
</resource>
</resource>
</resources>
</resources>
...
@@ -207,6 +223,29 @@
...
@@ -207,6 +223,29 @@
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<version>
3.3.0
</version>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}
</finalName>
<appendAssemblyId>
false
</appendAssemblyId>
<descriptors>
<descriptor>
../assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
${project.parent.basedir}/dist/${project.artifactId}
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
datav-manager/src/main/bin/check_server.sh
0 → 100644
View file @
c923250f
#!/bin/bash
PORT
=
"@profiles.server.port@"
PROJECT_NAME
=
"@project.artifactId@"
;
MAIN_CLASS
=
"
$PROJECT_NAME
-@project.version@.jar"
;
SHELL_NAME
=
$0
SHELL_LOG
=
"
${
SHELL_NAME
}
.log"
LOG_DATE
=
'date "+%Y-%m-%d"'
LOG_TIME
=
'date "+%H-%M-%S"'
CDATE
=
$(
date
"+%Y-%m-%d"
)
CTIME
=
$(
date
"+%H-%M-%S"
)
#写日志
writelog
()
{
LOGINFO
=
$1
echo
"
${
CDATE
}
${
CTIME
}
:
${
SHELL_NAME
}
:
${
LOGINFO
}
"
>>
${
SHELL_LOG
}
}
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
writelog
"The
$PROJECT_NAME
start finished, PID is
$jcpid
"
exit
$SUCCESS
else
writelog
"start service..."
systemctl stop
${
PROJECT_NAME
}
&&
systemctl start
${
PROJECT_NAME
}
fi
datav-manager/src/main/bin/deploy.sh
0 → 100644
View file @
c923250f
#!/bin/sh
RETVAL
=
$?
SHELL_NAME
=
"deploy"
BASEDIR
=
$(
dirname
$0
)
BASEDIR
=
$(
(
cd
"
$BASEDIR
"
pwd
)
)
LOCK_FILE
=
"/tmp/deploy.lock"
# 时间变量
CDATE
=
$(
date
"+%Y-%m-%d"
)
CTIME
=
$(
date
"+%H:%M:%S"
)
SHELL_LOG
=
"
${
BASEDIR
}
/
${
SHELL_NAME
}
.log"
JAVA_HOME
=
"/usr/local/java/jdk1.8"
SERVICE_PATH
=
"/usr/lib/systemd/system"
PUBLISH_PATH
=
"@profiles.publish.path@"
PROJECT_NAME
=
"@project.artifactId@"
PROJECT_EXECPATH
=
"
${
PUBLISH_PATH
}
/
${
PROJECT_NAME
}
"
PROJECT_UI_EXECPATH
=
"
${
PUBLISH_PATH
}
/
${
PROJECT_NAME
}
-ui/dist"
PROJECT_FILENAME
=
"
${
PROJECT_NAME
}
.tar.gz"
PROJECT_UI_FILENAME
=
"
${
PROJECT_NAME
}
-ui.tar.gz"
PROJECT_SERVICE
=
"
${
SERVICE_PATH
}
/
${
PROJECT_NAME
}
.service"
#写日志
writelog
()
{
LOGINFO
=
$1
echo
"
${
CDATE
}
${
CTIME
}
:
${
SHELL_NAME
}
:
${
LOGINFO
}
"
>>
${
SHELL_LOG
}
echo
${
LOGINFO
}
}
#清理目标
clear_deploy
()
{
SERVICE
=
$1
EXECPATH
=
$2
#清理后台自启服务
rm
-rf
${
SERVICE
}
#清理执行文件目录
rm
-rf
${
EXECPATH
}
}
build_service
()
{
SERVICE
=
$1
EXECPATH
=
$2
echo
""
>
${
SERVICE
}
echo
"[Unit]"
>>
${
SERVICE
}
echo
"Description=
${
PROJECT_NAME
}
"
>>
${
SERVICE
}
echo
"After=network.target"
>>
${
SERVICE
}
echo
""
>>
${
SERVICE
}
echo
"[Service]"
>>
${
SERVICE
}
echo
"Environment=
\"
JAVA_HOME=
$JAVA_HOME
\"
"
>>
${
SERVICE
}
echo
"Type=forking"
>>
${
SERVICE
}
echo
"ExecStart=
${
EXECPATH
}
/bin/start.sh"
>>
${
SERVICE
}
echo
"ExecStop=
${
EXECPATH
}
/bin/shutdown.sh"
>>
${
SERVICE
}
echo
"PrivateTmp=true"
>>
${
SERVICE
}
echo
""
>>
${
SERVICE
}
echo
"[Install]"
>>
${
SERVICE
}
echo
"WantedBy=multi-user.target"
>>
${
SERVICE
}
writelog
"
${
PROJECT_NAME
}
服务创建完成!"
}
#启动服务与nginx
start_service
()
{
systemctl
enable
${
PROJECT_NAME
}
systemctl daemon-reload
writelog
"
${
PROJECT_NAME
}
服务启动..."
systemctl stop
${
PROJECT_NAME
}
&&
systemctl start
${
PROJECT_NAME
}
project_status
=
$(
systemctl status
"
${
PROJECT_NAME
}
"
|grep Active |awk
'{print $2}'
)
jcpid
=
$(
ps
-ef
|
grep
-v
"grep"
|
grep
"
${
PROJECT_NAME
}
"
|
awk
'{print $2}'
)
writelog
"
${
PROJECT_NAME
}
服务启动,PID is
${
jcpid
}
,status:
${
project_status
}
"
}
#部署后台服务
project_deploy
()
{
writelog
"
${
PROJECT_NAME
}
_deploy"
systemctl stop
${
PROJECT_NAME
}
clear_deploy
${
PROJECT_SERVICE
}
${
PROJECT_EXECPATH
}
writelog
"
${
PROJECT_NAME
}
_clear_finish"
tar
-zvxf
./
${
PROJECT_FILENAME
}
-C
${
PUBLISH_PATH
}
build_service
${
PROJECT_SERVICE
}
${
PROJECT_EXECPATH
}
start_service
writelog
"
${
PROJECT_NAME
}
_deploy_finish"
}
#主函数
main
()
{
echo
"后台服务部署"
project_deploy
exit
${
RETVAL
}
}
main
$1
datav-manager/src/main/bin/shutdown.sh
View file @
c923250f
#! /bin/sh
#! /bin/sh
PORT
=
"@profiles.server.port@"
PORT
=
"@profiles.server.port@"
BASEDIR
=
`
dirname
$0
`
BASEDIR
=
$(
dirname
$0
)
BASEDIR
=
`
(
cd
"
$BASEDIR
"
;
pwd
)
`
BASEDIR
=
$(
(
cd
"
$BASEDIR
"
pwd
)
)
PROJECT_NAME
=
"@project.artifactId@"
PROJECT_NAME
=
"@project.artifactId@"
MAIN_CLASS
=
"
$PROJECT_NAME
"
;
MAIN_CLASS
=
"
$PROJECT_NAME
"
if
[
!
-n
"
$PORT
"
]
;
then
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
echo
$"Usage:
$0
{port}"
exit
$FAIL
exit
$FAIL
fi
fi
pid
=
$(
ps ax |
grep
-i
"
$MAIN_CLASS
"
|
grep
java |
grep
-v
grep
|
awk
'{print $1}'
)
pid
=
`
ps ax |
grep
-i
"
$MAIN_CLASS
"
|
grep
java |
grep
-v
grep
|
awk
'{print $1}'
`
if
[
-z
"
$pid
"
]
;
then
if
[
-z
"
$pid
"
]
;
then
echo
"No Server running."
echo
"No Server running."
exit
1
exit
-1
;
fi
fi
echo
"stoping application
$PROJECT_NAME
......"
echo
"stoping application
$PROJECT_NAME
......"
kill
-
9
${
pid
}
kill
-
15
${
pid
}
echo
"Send shutdown request to Server
$PROJECT_NAME
OK"
echo
"Send shutdown request to Server
$PROJECT_NAME
OK"
datav-manager/src/main/bin/start.cmd
View file @
c923250f
...
@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.name=%PROJECT_NAME%
...
@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.name=%PROJECT_NAME%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dapp
.port
=
%PORT%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dapp
.port
=
%PORT%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Djava
.io.tmpdir
=
%TEMP_PATH%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Djava
.io.tmpdir
=
%TEMP_PATH%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dbasedir
=
%BASEDIR%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dbasedir
=
%BASEDIR%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dloader
.path
=
file
://
%BASEDIR%
/conf
,
file
://
%BASEDIR%
/lib
set
DEBUG_OPTS
=
set
DEBUG_OPTS
=
...
...
datav-manager/src/main/bin/start.sh
View file @
c923250f
...
@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)`
...
@@ -5,9 +5,9 @@ BASEDIR=`(cd "$BASEDIR"; pwd)`
PROJECT_NAME
=
"@project.artifactId@"
;
PROJECT_NAME
=
"@project.artifactId@"
;
MAIN_CLASS
=
"
$PROJECT_NAME
-@project.version@.jar"
;
MAIN_CLASS
=
"
$PROJECT_NAME
-@project.version@.jar"
;
LOG_PATH
=
"@profiles.log.path@/
$PROJECT_NAME
"
LOG_PATH
=
"@profiles.log.path@/
$PROJECT_NAME
"
GC_PATH
=
$LOG_PATH
/
$PORT
"-gc.log"
GC_PATH
=
$LOG_PATH
/
PROJECT_NAME
"-gc.log"
HS_ERR_PATH
=
$LOG_PATH
/
$PORT
"-hs_err.log"
HS_ERR_PATH
=
$LOG_PATH
/
PROJECT_NAME
"-hs_err.log"
HEAP_DUMP_PATH
=
$LOG_PATH
/
$PORT
"-heap_dump.hprof"
HEAP_DUMP_PATH
=
$LOG_PATH
/
PROJECT_NAME
"-heap_dump.hprof"
TEMP_PATH
=
$LOG_PATH
/temp/
TEMP_PATH
=
$LOG_PATH
/temp/
SUCCESS
=
0
SUCCESS
=
0
FAIL
=
9
FAIL
=
9
...
@@ -32,9 +32,8 @@ if [ -z "$JAVACMD" ] ; then
...
@@ -32,9 +32,8 @@ if [ -z "$JAVACMD" ] ; then
JAVACMD
=
"
$JAVA_HOME
/bin/java"
JAVACMD
=
"
$JAVA_HOME
/bin/java"
fi
fi
else
else
JAVACMD
=
`
which java
>
/dev/null 2>&1
`
JAVACMD
=
`
which java
`
echo
"Error: JAVA_HOME is not defined correctly."
echo
"Error: JAVA_HOME is
$JAVACMD
"
exit
$ERR_NO_JAVA
fi
fi
fi
fi
...
@@ -60,6 +59,7 @@ exec "$JAVACMD" $JAVA_OPTS \
...
@@ -60,6 +59,7 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dapp
.port
=
"
$PORT
"
\
-Dapp
.port
=
"
$PORT
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Dloader
.path
=
"file://
$BASEDIR
/conf,file://
$BASEDIR
/lib"
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
15502
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
15502
\
-jar
$MAIN_CLASS
\
-jar
$MAIN_CLASS
\
>
/dev/null &
>
/dev/null &
...
...
datav-manager/src/main/bin/stop.sh
0 → 100644
View file @
c923250f
#! /bin/sh
PORT
=
"@profiles.server.port@"
BASEDIR
=
`
dirname
$0
`
BASEDIR
=
`
(
cd
"
$BASEDIR
"
;
pwd
)
`
PROJECT_NAME
=
"@project.artifactId@"
MAIN_CLASS
=
"
$PROJECT_NAME
"
;
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
exit
$FAIL
fi
echo
"stoping application
$PROJECT_NAME
......"
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
is not started or has been stopped!"
else
curl
-X
POST
-i
-u
$SECURITY_USERNAME
:
$SECURITY_PASSWORD
http://127.0.0.1:
$PORT
/xxx_manager/shutdown
for
i
in
{
1..60
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-15
$jcpid
for
i
in
{
1..30
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
fi
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-9
$jcpid
[
$?
-eq
0
]
&&
echo
"Stop
$PROJECT_NAME
OK!"
||
echo
"Stop
$PROJECT_NAME
Fail!"
fi
fi
Write
Preview
Markdown
is supported
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