mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +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 \
|
||||
|
||||
2
env/.local/scripts/utils/hpa/hpa.env
vendored
2
env/.local/scripts/utils/hpa/hpa.env
vendored
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
|
||||
|
||||
# Docker vars.
|
||||
HPA_DOCKER_IMAGE="git.housh.dev/michael/swift-hpa"
|
||||
HPA_DOCKER_IMAGE=${HPA_DOCKER_IMAGE:-"git.housh.dev/michael/swift-hpa"}
|
||||
HPA_DOCKER_TAG=${HPA_DOCKER_TAG:-"latest"}
|
||||
|
||||
# Auto pull options to be ran before running the hpa docker
|
||||
|
||||
Reference in New Issue
Block a user