I wanted to understand how to create a script sh that allows me to see if an additional script functions correctly.
For now this is the script that I created.
if /run.sh status
echo "$SERVICEXE running, everything is fine"
else
echo "$SERVICEXE is not running!"
fi
At this point, I would like it if checking the status of run.sh proves that it is not running, (output: No server running) that this is restarted. But I would not know how to check if the string (/run.sh status) issues this result then that this service is restarted. I would not use the pid because you will create many similar processes, and I think the script would conflict. I hope I explained