You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
443 B

#!/bin/bash
jarname="ruisi-web-admin.jar"
nohupfile="admin.nohup"
# kill the process
pid=$(ps aux | grep $jarname | grep -v grep | awk '{print $2}')
if [ -n "$pid" ]
then
kill -9 $pid
fi
# run the process
sleep 1
#nohup java -Xms512m -Xmx512m -jar $jarname --spring.profiles.active=prod> $nohupfile &
nohup java -Xms2048m -Xmx2048m -jar $jarname --spring.profiles.active=prod> $nohupfile &
# show log
sleep 1
tail -f $nohupfile