mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 22:22:40 +00:00
feat: Adds customer share mount to runs/after/system
This commit is contained in:
21
env/.local/scripts/hpa
vendored
21
env/.local/scripts/hpa
vendored
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user