From 350a9011f3bb3125b3f6cbc0c6eff9250281a742 Mon Sep 17 00:00:00 2001 From: Gokul A Date: Tue, 31 Oct 2023 13:49:29 -0400 Subject: [PATCH 1/2] fix location pre-fix --- pygeoweaver/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoweaver/start.sh b/pygeoweaver/start.sh index 3b5e316..6950f83 100755 --- a/pygeoweaver/start.sh +++ b/pygeoweaver/start.sh @@ -7,7 +7,7 @@ echo "Check Java.." touch ~/.bashrc && source ~/.bashrc echo "Start Geoweaver.." -nohup java -jar ~/geoweaver.jar > ~/geoweaver.log & +nohup ~/jdk/jdk-11.0.18+10/bin/java -jar ~/geoweaver.jar > ~/geoweaver.log & STATUS=0 counter=0 From 7668e64e44834a4e14b5ef5a2504028f4399b753 Mon Sep 17 00:00:00 2001 From: Gokul Prathin <45752727+gokulprathin8@users.noreply.github.com> Date: Wed, 1 Nov 2023 02:15:23 -0400 Subject: [PATCH 2/2] conditional check bashrc before touch command --- pygeoweaver/start.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pygeoweaver/start.sh b/pygeoweaver/start.sh index 6950f83..514a943 100755 --- a/pygeoweaver/start.sh +++ b/pygeoweaver/start.sh @@ -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 & @@ -25,4 +28,4 @@ if [ $counter == 20 ] ; then else echo "Success: Geoweaver is up" exit 0 -fi \ No newline at end of file +fi