8.4 Config File Download _top_ R18 | Lmc

#--- Variables --------------------------------------------------------- LMC_HOST="lmc.example.com" API_KEY="$LMC_API_KEY" # export LMC_API_KEY=xxxxx beforehand DEST_DIR="/opt/lmc/config" FILE_NAME="lmc_config_r18.yaml" URL="https://$LMC_HOST/api/v1/config/download?rev=18"

LOCAL_CHECKSUM=$(sha256sum "$FILE_NAME" | awk 'print $1') lmc 8.4 config file download r18

#--- Create destination folder (if needed) ------------------------------- mkdir -p "$DEST_DIR" cd "$DEST_DIR" || echo "❌ Cannot cd to $DEST_DIR"; exit 1; if [[ "$SERVER_CHECKSUM" != "$LOCAL_CHECKSUM" ]]

if [[ "$SERVER_CHECKSUM" != "$LOCAL_CHECKSUM" ]]; then echo "⚠️ Checksum mismatch!" echo " Server: $SERVER_CHECKSUM" echo " Local : $LOCAL_CHECKSUM" rm -f "$FILE_NAME" exit 1 fi lmc 8.4 config file download r18

#--- Check HTTP status --------------------------------------------------- if [[ "$HTTP_RESPONSE" != "200" ]]; then echo "❌ Download failed – HTTP $HTTP_RESPONSE" exit 1 fi

$OutFile = Join-Path $DestDir $FileName