Skip to content

Commit f8d78de

Browse files
committed
增加脚本
1 parent 76097d4 commit f8d78de

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

springboot-package/build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="datastore" default="copyAll" basedir=".">
2+
<project name="springboot-package" default="copyAll" basedir=".">
33
<property name="build" value="build" />
44
<property name="target" value="target" />
55
<target name="clean">

springboot-package/start.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
APPDIR=`pwd`
3+
PIDFILE=$APPDIR/springboot-package.pid
4+
if [ -f "$PIDFILE" ] && kill -0 $(cat "$PIDFILE"); then
5+
echo "springboot-package is already running..."
6+
exit 1
7+
fi
8+
nohup java -jar $APPDIR/springboot-package.jar >/dev/null 2>&1 &
9+
echo $! > $PIDFILE
10+
echo "start springboot-package..."

springboot-package/stop.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
APPDIR=`pwd`
3+
PIDFILE=$APPDIR/springboot-package.pid
4+
if [ ! -f "$PIDFILE" ] || ! kill -0 "$(cat "$PIDFILE")"; then
5+
echo "springboot-package not running..."
6+
else
7+
echo "stopping springboot-package..."
8+
PID="$(cat "$PIDFILE")"
9+
kill -9 $PID
10+
rm "$PIDFILE"
11+
echo "...springboot-package stopped"
12+
fi

0 commit comments

Comments
 (0)