feat: Adds customer share mount to runs/after/system

This commit is contained in:
2025-11-18 10:48:47 -05:00
parent 8daa596205
commit 4b674c40c9
3 changed files with 23 additions and 9 deletions

View File

@@ -22,15 +22,20 @@ SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
############################## MAIN ##############################
last_pull="0"
if [[ -f "$HPA_CONFIG_DIR/.lastpull" ]]; then
last_pull=$(cat "$HPA_CONFIG_DIR/.lastpull")
fi
curr=$(date +%s)
diff=$((curr - last_pull))
# Don't pull images if they're prefixed with 'localhost'.
if echo "$HPA_DOCKER_IMAGE" | grep -vq "localhost"; then
if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; then
. "$SCRIPTS/hpa-pull" "$HPA_AUTO_PULL_OPTS"
# Check if we should pull the image prior to running.
last_pull="0"
if [[ -f "$HPA_CONFIG_DIR/.lastpull" ]]; then
last_pull=$(cat "$HPA_CONFIG_DIR/.lastpull")
fi
curr=$(date +%s)
diff=$((curr - last_pull))
if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; then
. "$SCRIPTS/hpa-pull" "$HPA_AUTO_PULL_OPTS"
fi
fi
podman run --rm --interactive --tty \