I have CentOS 7 and looking for a sollution about a small issue. I want to have a sudo script to be run but only if the system executed a specific command remotely. For example:
I've put my command into a PHP file and I can execute just by curl-ing it. I want the server to notice that the command was executed and execute another command but as sudo and only after the previous command is done.
It this even possible or it's jsut too complicated?