add something like this in your script
Code:
#!/bin/bash
whatsrunning="$(pidof firefox)"
[[ $whatsrunning ]] && echo "$whatsrunning">/dev/null || echo " start applicating instead"
where firefox is your program you're checking to see if it
is already running. if yes then send results to NULL else start it.
OR
Code:
#!/bin/bash
whatsrunning="$(pidof firefox)"
[[ ! $whatsrunning ]] && echo "starting applicating"
if it is not running then start it, replace echo statement with the name of the app you want started to start it.
if it is already running then nothing will take place unless you code it to within your script.
Code:
#!/bin/bash
whatsrunning="$(pidof "whatever your program is called")"
[[ ! $whatsrunning ]] && java -Djava.net.preferIPv4Stack=true \
-Dsun.java2d.opengl=true \
-jar \
file-name.jar "/home/user/CIP_01/config/file-name.properties"
that might work, I don't know if I chopped it up properly in the right areas of that entire command.