Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
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
廖旭伟
self-service
Commits
2f606cd6
Commit
2f606cd6
authored
Feb 21, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加部署文件
parent
8fa4f312
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
21 deletions
+69
-21
sst-manager/pom.xml
sst-manager/pom.xml
+20
-0
sst-manager/src/main/bin/check_server.sh
sst-manager/src/main/bin/check_server.sh
+28
-0
sst-manager/src/main/bin/shutdown.sh
sst-manager/src/main/bin/shutdown.sh
+14
-14
sst-manager/src/main/bin/start.sh
sst-manager/src/main/bin/start.sh
+7
-7
No files found.
sst-manager/pom.xml
View file @
2f606cd6
...
@@ -66,6 +66,26 @@
...
@@ -66,6 +66,26 @@
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
</properties>
</properties>
</profile>
</profile>
<profile>
<id>
yibin
</id>
<properties>
<profiles.active>
yibin
</profiles.active>
<profiles.server.port>
17217
</profiles.server.port>
<profiles.queue.type>
rabbitmq
</profiles.queue.type>
<profiles.rabbitmq.host>
172.15.28.115
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.password>
admin@2020
</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>
/
</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>
172.15.28.120:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.filepath>
/mortals/app/data
</profiles.filepath>
<profiles.log.level>
INFO
</profiles.log.level>
</properties>
</profile>
</profiles>
</profiles>
<dependencies>
<dependencies>
...
...
sst-manager/src/main/bin/check_server.sh
0 → 100644
View file @
2f606cd6
#!/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
sst-manager/src/main/bin/shutdown.sh
View file @
2f606cd6
#! /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"
sst-manager/src/main/bin/start.sh
View file @
2f606cd6
...
@@ -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,7 +59,8 @@ exec "$JAVACMD" $JAVA_OPTS \
...
@@ -60,7 +59,8 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dapp
.port
=
"
$PORT
"
\
-Dapp
.port
=
"
$PORT
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
15502
\
-Dloader
.path
=
"file://
$BASEDIR
/conf,file://
$BASEDIR
/lib"
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
5616
\
-jar
$MAIN_CLASS
\
-jar
$MAIN_CLASS
\
>
/dev/null &
>
/dev/null &
...
...
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