ports/net-mgmt/netbox/files/850.netbox-housekeeping.sample.in
Kai Knoblich 0627700a0b net-mgmt/netbox: Update to 3.0.4
Changelog since 2.11.12:

It contains many bugfixes/enhancements and the following new features:

* Updated User Interface
* GraphQL API
* IP Ranges
* Custom Model Validation
* SVG Cable Traces
* New Views for Models Previously Under the Admin UI
* REST API Token Provisioning
* New Housekeeping Command
* Custom Queue Support for Plugins

https://netbox.readthedocs.io/en/stable/release-notes/version-3.0/

MFH:		No (feature release)
2021-10-04 19:22:58 +02:00

32 lines
777 B
Bash

#!/bin/sh
# This shell script invokes NetBox's housekeeping management command, which
# intended to be run nightly.
#
# If you want to enable this script, copy it to %%PREFIX%%/etc/periodic/daily
# and place the following into /etc/periodic.conf:
#
# daily_netbox_housekeeping_enable="YES"
#
# If NetBox has been installed into a nonstandard location, update the paths
# below.
command="%%PYTHON_CMD%%"
netbox_root="%%DATADIR%%"
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]; then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
rc=0
case "$daily_netbox_housekeeping_enable" in
[Yy][Ee][Ss])
echo ""
echo "Running NetBox housekeeping:"
$command "$netbox_root/manage.py" housekeeping
rc=$?
esac
exit $rc