Update custom-scripts.md

Added information on the custom script directory.
This commit is contained in:
Scraps23 2022-07-03 11:50:26 -04:00 committed by GitHub
parent 7c09259b7d
commit 11e98bdd64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,8 @@ Custom scripting was introduced to provide a way for users to execute custom log
Custom scripts are Python code and exist outside of the official NetBox code base, so they can be updated and changed without interfering with the core NetBox installation. And because they're completely custom, there is no inherent limitation on what a script can accomplish.
By default, custom scripts are located at `{INSTALL DIR}/netbox/scripts/`. If you followed the [Installation Guide](https://netbox.bnassif.us/static/docs/installation/3-netbox/#option-a-download-a-release-archive), this would be `/opt/netbox/netbox/scripts/`. You can override this directory by setting the `SCRIPTS_ROOT` value in the netbox config.
## Writing Custom Scripts
All custom scripts must inherit from the `extras.scripts.Script` base class. This class provides the functionality necessary to generate forms and log activity.