You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/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
|
|
|
|
|
|
|
|
echo "================================"
|
|
|
|
echo " $1 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 &
|
|
|
|
|