Go to your web server/virtual machine page and chose the OPS tab
Click the Automations section
Click +Add new Automation Action
Click the +add button corresponding to the New Bash Script template
The resulting New Bash Script Action Template page will allow you the choice of enabling/disabling the plugin,, give it a title, specify the current working directory the command will be run from, the command timeout, the user to run under, a description as well as the script editor for the code.
Click Save changes
To execute the script, go to the Packages section (right above Automations) and click Deploy Changes (note that you can chose not to deploy any packages by switching them off on the same page)