...
- Scripts should be placed in /home/hostbill/scripts
- Script should be made executable for hostbill user (chmod u+x)
- If possible, use hashbang 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
Configuring module/product
...
- 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):
- Note about arguments:
All arguments will be escaped before execution for additional security.
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:
Code Block | ||
---|---|---|
| ||
$config = array();
$config['ScriptsDirectory'] = "/path/to/your/scripts/dir"; |
Make sure that this directory is not accessible from web (outside of public_html or similar folders)