I have a bash/php script on a remote server that takes few line arguments. Both servers are centOS.
So far in my research I have come across this where i could copy the bash script locally and execute it passing it to bash that executes it remotely:
ssh root@REMOTE_HOST 'bash -s' < local_script.sh var1 var2 var3
The script on the remote server writes a bool to a file - I am thinking I can just wget the file and check the bool value that way
Is this a correct approach?