-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Change Type
Correction
Area
Installation instructions
Proposed Changes
The upgrade documentation offers a copy/paste snippet for installing the included housekeeping script as a cronjob:
cp /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/
Per the manpage for Debian cron: (emphasis added)
[…] the files under these directories have to be pass some sanity checks including the following: […] the file names must conform to the filename requirements of run-parts[…]. Any file that does not conform to these requirements will not be executed by run-parts. For example, any file containing dots will be ignored. […]
I noticed on my NetBox installation that housekeeping was not being run, and this was because the script filename still had the .sh.
I suggest improving the command in the documentation thusly:
cp /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
It may also be prudent to include a note about cron in the same section of the documentation as the snippet, to ensure others (like me!) who may not have a nuanced knowledge of cron and run-parts are not falling into the same trap.
It also may be prudent to include logic within NetBox to detect if housekeeping has not run for some amount of ‘a long time’, which may be an indication of improper installation, or to simply provide an indication (perhaps in the footer? in settings?) of when housekeeping was last run, but that can be a separate issue.