diff --git a/g9-migration/REGISTRE-BRIQUES.md b/g9-migration/REGISTRE-BRIQUES.md index 72ff324..8da8e0b 100644 --- a/g9-migration/REGISTRE-BRIQUES.md +++ b/g9-migration/REGISTRE-BRIQUES.md @@ -10,7 +10,7 @@ > > Couverture backup : g9=restic (sources /data /home/folzo /etc, cron 03:30) ; j5040=non (à couvrir Phase 5) - + | Machine | Conteneur | Projet / service (compose) | Image | État | Épinglée | Watchtower | Type | Dans le kit | Endpoint (Caddy) | |---|---|---|---|---|---|---|---|---|---| diff --git a/g9-migration/scripts/lib-notify.sh b/g9-migration/scripts/lib-notify.sh index 20a7187..327e8ce 100644 --- a/g9-migration/scripts/lib-notify.sh +++ b/g9-migration/scripts/lib-notify.sh @@ -9,9 +9,15 @@ G9_SSH_KEY="${G9_SSH_KEY:-$HOME/.ssh/id_ed25519_openfox11}" notify_json() { local payload="$1" b64 + if [ -z "$payload" ]; then + echo "NOTIFY_KO no-payload" + return 1 + fi b64="$(printf '%s' "$payload" | base64 -w0)" + # sudo ne transmet pas l'environnement (sudoers sans SETENV) : payload et URL + # passent en arguments, pas en variables exportées. ssh -o ConnectTimeout=8 -o BatchMode=yes -i "$G9_SSH_KEY" "$G9_SSH" \ - "REGISTRY_B64='$b64' sudo -E python3 /usr/local/bin/g9-notify.py" 2>&1 | tail -1 + "sudo python3 /usr/local/bin/g9-notify.py '$b64' '$(cat "$HOME/.config/g9-migration/hub_url" 2>/dev/null)'" 2>&1 | tail -1 } notify_simple() {