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.
18 lines
354 B
18 lines
354 B
#!/bin/bash
|
|
jarname="ruisi-web-client.jar"
|
|
nohupfile="client.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 &
|
|
|
|
# show log
|
|
sleep 1
|
|
tail -f $nohupfile
|
|
|