mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
feat(scripts): Suppress housekeeping cron output
Allow optional logging in the NetBox housekeeping script. Users can choose silent execution or log to a file.
This commit is contained in:
parent
cc099e86e1
commit
c4a23af740
@ -6,4 +6,16 @@
|
|||||||
#
|
#
|
||||||
# If NetBox has been installed into a nonstandard location, update the paths
|
# If NetBox has been installed into a nonstandard location, update the paths
|
||||||
# below.
|
# below.
|
||||||
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
|
# By default, all output is discarded. Uncomment the log lines below to enable
|
||||||
|
# logging.
|
||||||
|
|
||||||
|
# Run quietly (no log)
|
||||||
|
# --------------------
|
||||||
|
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping > /dev/null 2>&1
|
||||||
|
|
||||||
|
# Run with logging (append output to log file)
|
||||||
|
# --------------------------------------------
|
||||||
|
# LOGFILE="/var/log/netbox/housekeeping.log"
|
||||||
|
# echo "[$(date)] Starting NetBox housekeeping..." >> "$LOGFILE"
|
||||||
|
# /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping >> "$LOGFILE" 2>&1
|
||||||
|
# echo "[$(date)] NetBox housekeeping complete." >> "$LOGFILE"
|
||||||
|
Loading…
Reference in New Issue
Block a user