Skip to content

Instantly share code, notes, and snippets.

@luojiyin1987
Created July 15, 2021 01:58
Show Gist options
  • Save luojiyin1987/5278ab682fcd084c5567f4f343a1bca6 to your computer and use it in GitHub Desktop.
Save luojiyin1987/5278ab682fcd084c5567f4f343a1bca6 to your computer and use it in GitHub Desktop.
#/bin/bash
while true;
do
count=`ps -p $(cat application.pid)|wc -l`
if [ ${count} -lt 2 ]; then
nohup jdk-11.0.11/bin/java -Xms2g -Xmx8g -jar auto-image-compose-server-0.0.1-SNAPSHOT.jar &
else
echo "image-compose-server is running"
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment