Discussion in 'General Discussion' started by LoreZyra, Jul 25, 2012.
Where can I find a reference on using event actions to trigger a custom built script?
Please check "Support and Administration" -> "Managing events" section of Provider's Guide: http://download.pa.parallels.com/pbas/4.2/doc/PBAS_PG/notifications_setup.htm
Thanks! However, this link would have saved me a couple of minutes reading: http://download.pa.parallels.com/pbas/4.2/doc/PBAS_PG/list_of_events.htm
Also, It would be great if you had examples of how to create custom scripts.
Type the commands to execute into the Command line field. In the commands you can use the placeholders (different expressions that start from @@ and end by @). All the placeholders available are shown in the list below the Command line field. Designation of each placeholder is explained in the right column of the list. Being inserted in the script commands each placeholder automatically drops appropriate value to the actual command generated. Actual values that replace placeholders are being taken from Parallels Business Automation - Standard database, in accordance with particular Account the event is associated with.
Very simple example:
mkdir -p /tmp/test/
echo @@provider.address1@ > /tmp/test/addr
File /tmp/test/addr will be created on event and provider address will be put in the file.
So, you should write your script, then put a command to execute it in the "Command Line" field.
Use placeholders as arguments for the script.
Separate names with a comma.