Il PC lo prepara Claude, su Windows o Mac

Chi arriva installa Claude e gli scrive una frase: i programmi li installa
l'assistente (winget o Homebrew). configura.sh chiede la password Gitea e
crea da solo il token, salva la chiave AWS senza aws configure e carica la
chiave SSH pubblica sul profilo Gitea, da dove la prende l'amministratore.
verifica.sh non usa piu' timeout, che sul Mac non c'e'. Il repository e'
pubblico: non ha segreti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fabio
2026-09-30 19:19:13 +02:00
co-authored by Claude Opus 5.5
parent 059a23e76e
commit 8008b84bfb
4 changed files with 184 additions and 110 deletions
+9 -2
View File
@@ -54,8 +54,15 @@ if [ -f "$CHIAVE_SSH" ] ; then ok "$CHIAVE_SSH" ; else rosso "chiave mancante: r
titolo "VPN e server"
# La VPN si riconosce da una cosa sola: staging, che sta su rete privata,
# risponde sulla porta SSH.
if timeout 5 bash -c "exec 3<>/dev/tcp/$STAGING_HOST/22" 2> /dev/null ; then
# risponde sulla porta SSH. Niente `timeout`: sul Mac non c'e'.
porta_aperta () {
bash -c "exec 3<>/dev/tcp/$1/$2" 2> /dev/null & local pid=$!
( sleep 5 ; kill "$pid" 2> /dev/null ) & local sveglia=$!
wait "$pid" 2> /dev/null ; local esito=$?
kill "$sveglia" 2> /dev/null
return "$esito"
}
if porta_aperta "$STAGING_HOST" 22 ; then
ok "VPN attiva (staging raggiungibile)"
if ssh -o BatchMode=yes -o ConnectTimeout=8 "$STAGING_NOME" true 2> /dev/null ; then
ok "entri su staging ($STAGING_NOME)"