Skip to content

Commit

Permalink
conditional check bashrc before touch command
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulprathin8 authored Nov 1, 2023
1 parent 350a901 commit 7668e64
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pygeoweaver/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
echo "Stop running Geoweaver if any.."
pkill -f geoweaver.jar

echo "Check Java.."
touch ~/.bashrc && source ~/.bashrc
echo "Checking Java..."
if [! -f ~/.bashrc ]; then
touch ~/.bashrc
fi
source ~/.bashrc

echo "Start Geoweaver.."
nohup ~/jdk/jdk-11.0.18+10/bin/java -jar ~/geoweaver.jar > ~/geoweaver.log &
Expand All @@ -25,4 +28,4 @@ if [ $counter == 20 ] ; then
else
echo "Success: Geoweaver is up"
exit 0
fi
fi

0 comments on commit 7668e64

Please sign in to comment.