fix(cron): correct implementation for cron spam prevention via wrapper script and deploy origin
Ampel / ampel (push) Failing after 21s

This commit is contained in:
Hitonabi
2026-07-27 17:12:39 +02:00
parent 4985977492
commit 7638f0244d
3 changed files with 35 additions and 9 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
# Erwartet den Job-Namen und das Skript als ein String oder zwei Argumente
if [ $# -eq 1 ]; then
read -r JOB_NAME SCRIPT_NAME <<< "$1"
else
JOB_NAME="$1"
SCRIPT_NAME="$2"
fi
if [ -z "$SCRIPT_NAME" ]; then
SCRIPT_NAME="$JOB_NAME"
fi
# Pfad zusammenbauen
SCRIPT_PATH="$HOME/mission-control-v2/deploy/$SCRIPT_NAME"
if [ ! -f "$SCRIPT_PATH" ]; then
# Versuche pruefstand/
SCRIPT_PATH="$HOME/mission-control-v2/deploy/pruefstand/$SCRIPT_NAME"
fi
bash "$SCRIPT_PATH" | bash "$HOME/mission-control-v2/deploy/notify.sh" -s "$JOB_NAME"