...
- Scripts should be placed in /home/hostbill/scripts
- Script should be made executable for hostbill user (chmod u+x)
- If possible, use hashbang shebang in your custom scripts
- On success your script should return 0 exit code.
- On failure return any other exit code
- Any script output is logged in related account log on error/success
- Before executing any script, module changes working directory (cwd) to main HostBill scripts directory
...
- As with any HostBill module, activate Script_Provisioning module in Settings→Modules section of adminarea.
- You will be redirected to Settings→Apps section to create connection, this module requires just adding name for its connection details
- When configuring product in Settings→Products & Services, select newly activated module & app:
. - Proceed to "Settings" Tab, to configure your scripts:
- Check which events should execute a script (ie. terminate/create etc.)
- From dropdown list select which script to execute (you should create scripts first)
- Provide arguments that script should be executed with, here you can use variables (up-to-date list is available in product configuration):
available in Available Variables tab
- Note about arguments:
All arguments will be escaped before execution for additional security.
- Under Custom client-triggered actions you can define which script to execute when client will trigger custom action from Client Functions::Client UI
Same rules/limitations/variables as in Settings tab apply - Under Available Variables you can check what variables can be used in your script arguments (up-to-date list is available in product configuration)
Non-Enterise install
...
By default scripts should be located in /home/hostbill/scripts directory, to use custom dir on other installations, edit includes/config.php file and add lines:
...