33800 Docs

← Retour

Task : Phase 3B Priorite 2 - Scripts Crons/Models/Syncthing

Date : 13/01/2026 13:50 Duree : ~15 min Statut : TERMINE


Objectif

Migrer les scripts de priorite 2 pour utiliser config.json.


Realisations

08-crons.sh

Migrations SSH :

# Avant
ssh gouroubleu@192.168.1.155 ...
ssh gouroubleu@192.168.1.196 ...

# Apres
PROXMOX1_IP=$(get_host_ip "proxmox1")
GITLAB_IP=$(get_host_ip "gitlab")
ssh gouroubleu@${PROXMOX1_IP} ...
ssh gouroubleu@${GITLAB_IP} ...

Migrations HTML (dans heredoc EOF) :

13-models.sh

Approche : sed post-generation (heredoc avec quotes simples)

sed -i "s/192\.168\.1\.30:11434/${WIN11_IP}:${OLLAMA_PORT}/g" "$OUTPUT_FILE"
sed -i "s|https://192\.168\.1\.10:8006|https://${PVE_IP}:${PVE_PORT}|g" "$OUTPUT_FILE"
sed -i "s|https://192\.168\.1\.12:9443|https://${PROD_IP}:${PROD_PORT}|g" "$OUTPUT_FILE"
sed -i "s|https://192\.168\.1\.51:9443|https://${DEV_IP}:${DEV_PORT}|g" "$OUTPUT_FILE"

14-syncthing.sh

Migration SSH :

PROD_IP=$(get_host_ip "prod-portainer")
ssh gouroubleu@${PROD_IP} "docker ps..."

Migration HTML (heredoc sans quotes) :

<td>prod-portainer ($PROD_IP)</td>

Tests

./generate.sh  # OK - pas d'erreurs

# Verification IPs dynamiques
curl crons.html | grep "pve ("      # 192.168.1.10 OK
curl models.html | grep "11434"     # 192.168.1.30:11434 OK
curl syncthing.html | grep "prod-"  # 192.168.1.12 OK

Resume Phase 3B Complete

Script Methode IPs migrees
01-index.sh CONFIG JS + footer bash 8+
08-crons.sh Variables bash + heredoc EOF 6
13-models.sh sed post-generation 7
14-syncthing.sh Variable bash + heredoc 2

Total Phase 3B : ~35 IPs migrees vers config.json