netbox-docker/docker/housekeeping.sh
Tobias Genannt 4e48bf6a77 Added container for Netbox housekeeping command
Adds an additional container in which the new "housekeeping" command from
Netbox v3.0.0 is run. "tini" is now used as PID 1 to ensure correct process
management in all Netbox containers.
2021-08-31 17:39:55 +02:00

9 lines
213 B
Bash
Executable file

#!/bin/bash
SECONDS=${HOUSEKEEPING_INTERVAL:=86400}
echo "Interval set to ${SECONDS} seconds"
while true; do
date
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
sleep ${SECONDS}s
done