Add housekeeping task (docker image cleanup)
This commit is contained in:
parent
17c6a2b0e0
commit
2b78835872
|
@ -1,6 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source lib/functions.sh
|
source lib/functions.sh
|
||||||
|
|
||||||
|
AUTO_HOUSEKEEPING=${AUTO_HOUSEKEEPING:-true}
|
||||||
|
|
||||||
|
if [ "$AUTO_HOUSEKEEPING" == "true" ]; then
|
||||||
|
A="Performing automatic maintenance: Cleaning docker images."
|
||||||
|
hc_send log "$A"
|
||||||
|
log INFO "$A"
|
||||||
|
docker system prune -a -f
|
||||||
|
else
|
||||||
|
log WARN "Automatic housekeeping disabled (variable AUTO_HOUSEKEEPING != \"true\")"
|
||||||
|
fi
|
||||||
|
|
||||||
hc_send log "Checking for bridgehead updates ..."
|
hc_send log "Checking for bridgehead updates ..."
|
||||||
|
|
||||||
CONFFILE=/etc/bridgehead/$1.conf
|
CONFFILE=/etc/bridgehead/$1.conf
|
||||||
|
|
Loading…
Reference in New Issue