parent
1572b780ed
commit
3142aa48f7
@ -1,22 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ $# -ne 1 ]; then
|
#if [ $# -ne 1 ]; then
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
echo " Undefined parameter"
|
# echo " Undefined parameter"
|
||||||
echo "./backupApi.sh [application name]"
|
# echo "./backupApi.sh [application name]"
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
|
#if [ ! -f "../$1.jar" ]; then
|
||||||
|
# echo "==================================="
|
||||||
|
# echo " $1.jar file not exist"
|
||||||
|
# echo "==================================="
|
||||||
|
# exit 1
|
||||||
|
#fi
|
||||||
|
|
||||||
if [ ! -f "../$1.jar" ]; then
|
source /applications/adds/bin/stopApi.sh
|
||||||
echo "==================================="
|
|
||||||
echo " $1.jar file not exist"
|
|
||||||
echo "==================================="
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
source /applications/adds/bin/stopApi.sh $1
|
|
||||||
|
|
||||||
echo "-----------------------------------"
|
echo "-----------------------------------"
|
||||||
echo " $1 application backup success!"
|
echo " adds-api application backup success!"
|
||||||
echo "-----------------------------------"
|
echo "-----------------------------------"
|
||||||
mv /applications/adds/$1.jar /applications/adds/$1.jar_backup
|
mv /applications/adds/adds-api.jar /applications/adds/adds-api.jar_backup
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ $# -ne 1 ]; then
|
#if [ $# -ne 1 ]; then
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
echo " Undefined parameter"
|
# echo " Undefined parameter"
|
||||||
echo "./startApi.sh [application name]"
|
# echo "./startApi.sh [application name]"
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
if [ ! -f "../$1.jar" ]; then
|
#if [ ! -f "../$1.jar" ]; then
|
||||||
echo "==================================="
|
# echo "==================================="
|
||||||
echo " $1.jar file not exist"
|
# echo " $1.jar file not exist"
|
||||||
echo "==================================="
|
# echo "==================================="
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
echo "================================"
|
echo "================================"
|
||||||
echo " $1 application start"
|
echo " adds-api application start"
|
||||||
echo "================================"
|
echo "================================"
|
||||||
JAVA_HOME=/lib/jvm/jdk-17.0.2
|
JAVA_HOME=/lib/jvm/jdk-17.0.2
|
||||||
export JAVA_HOME
|
export JAVA_HOME
|
||||||
nohup $JAVA_HOME/bin/java -Dspring.profiles.active=prod -jar /applications/adds/$1.jar > /dev/null &
|
nohup $JAVA_HOME/bin/java -Dspring.profiles.active=prod -jar /applications/adds/adds-api.jar > /dev/null &
|
||||||
|
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ $# -ne 1 ]; then
|
#if [ $# -ne 1 ]; then
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
echo " Undefined parameter"
|
# echo " Undefined parameter"
|
||||||
echo "./stopApi.sh [application name]"
|
# echo "./stopApi.sh [application name]"
|
||||||
echo "-----------------------------------"
|
# echo "-----------------------------------"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
PID=`ps -ef | grep java | grep $1 | awk '{print $2}'`
|
PID=`ps -ef | grep java | grep adds-api | awk '{print $2}'`
|
||||||
echo "Process ID: $PID"
|
echo "Process ID: $PID"
|
||||||
if [ -z $PID ]; then
|
if [ -z $PID ]; then
|
||||||
echo "=============================="
|
echo "=============================="
|
||||||
echo " No $1 deamon is running"
|
echo " No adds-api deamon is running"
|
||||||
echo "=============================="
|
echo "=============================="
|
||||||
else
|
else
|
||||||
echo "Kill $1[$PID] process"
|
echo "Kill adds-api[$PID] process"
|
||||||
kill $PID
|
kill $PID
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
echo " $1[$PID] application stop"
|
echo " adds-api[$PID] application stop"
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue