mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-17 04:50:15 +02:00
Add housekeeping task (docker image cleanup)
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user