parent
1572b780ed
commit
3142aa48f7
@ -1,22 +1,22 @@
|
||||
#!/bin/sh
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "-----------------------------------"
|
||||
echo " Undefined parameter"
|
||||
echo "./backupApi.sh [application name]"
|
||||
echo "-----------------------------------"
|
||||
exit 1
|
||||
fi
|
||||
#if [ $# -ne 1 ]; then
|
||||
# echo "-----------------------------------"
|
||||
# echo " Undefined parameter"
|
||||
# echo "./backupApi.sh [application name]"
|
||||
# echo "-----------------------------------"
|
||||
# exit 1
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f "../$1.jar" ]; then
|
||||
# echo "==================================="
|
||||
# echo " $1.jar file not exist"
|
||||
# echo "==================================="
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
if [ ! -f "../$1.jar" ]; then
|
||||
echo "==================================="
|
||||
echo " $1.jar file not exist"
|
||||
echo "==================================="
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /applications/adds/bin/stopApi.sh $1
|
||||
source /applications/adds/bin/stopApi.sh
|
||||
|
||||
echo "-----------------------------------"
|
||||
echo " $1 application backup success!"
|
||||
echo " adds-api application backup success!"
|
||||
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
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "-----------------------------------"
|
||||
echo " Undefined parameter"
|
||||
echo "./startApi.sh [application name]"
|
||||
echo "-----------------------------------"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "../$1.jar" ]; then
|
||||
echo "==================================="
|
||||
echo " $1.jar file not exist"
|
||||
echo "==================================="
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#if [ $# -ne 1 ]; then
|
||||
# echo "-----------------------------------"
|
||||
# echo " Undefined parameter"
|
||||
# echo "./startApi.sh [application name]"
|
||||
# echo "-----------------------------------"
|
||||
# exit 1
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f "../$1.jar" ]; then
|
||||
# echo "==================================="
|
||||
# echo " $1.jar file not exist"
|
||||
# echo "==================================="
|
||||
# exit 1
|
||||
#fi
|
||||
#
|
||||
echo "================================"
|
||||
echo " $1 application start"
|
||||
echo " adds-api application start"
|
||||
echo "================================"
|
||||
JAVA_HOME=/lib/jvm/jdk-17.0.2
|
||||
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
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "-----------------------------------"
|
||||
echo " Undefined parameter"
|
||||
echo "./stopApi.sh [application name]"
|
||||
echo "-----------------------------------"
|
||||
exit 1
|
||||
fi
|
||||
#if [ $# -ne 1 ]; then
|
||||
# echo "-----------------------------------"
|
||||
# echo " Undefined parameter"
|
||||
# echo "./stopApi.sh [application name]"
|
||||
# echo "-----------------------------------"
|
||||
# exit 1
|
||||
#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"
|
||||
if [ -z $PID ]; then
|
||||
echo "=============================="
|
||||
echo " No $1 deamon is running"
|
||||
echo " No adds-api deamon is running"
|
||||
echo "=============================="
|
||||
else
|
||||
echo "Kill $1[$PID] process"
|
||||
echo "Kill adds-api[$PID] process"
|
||||
kill $PID
|
||||
echo "==============================="
|
||||
echo " $1[$PID] application stop"
|
||||
echo " adds-api[$PID] application stop"
|
||||
echo "==============================="
|
||||
fi
|
||||
|
Loading…
Reference in New Issue