diff --git a/VERSION b/VERSION index ba50e86..bee17c9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.12 \ No newline at end of file +1.3.13 \ No newline at end of file diff --git a/packaging/debian/edgeguard-api/DEBIAN/postinst b/packaging/debian/edgeguard-api/DEBIAN/postinst index 3153975..ead225b 100755 --- a/packaging/debian/edgeguard-api/DEBIAN/postinst +++ b/packaging/debian/edgeguard-api/DEBIAN/postinst @@ -951,17 +951,23 @@ KEEPALIVEDDROPIN continue fi P_TMP="$(mktemp -d)" - if curl -sL --max-time 45 \ - "https://github.com/coreruleset/${plugin}-plugin/archive/refs/heads/main.tar.gz" \ - -o "${P_TMP}/p.tgz" 2>/dev/null; then - tar xzf "${P_TMP}/p.tgz" -C "${P_TMP}" 2>/dev/null || true - if ls "${P_TMP}"/*/plugins/${plugin}-*.conf >/dev/null 2>&1; then - install -m 0644 "${P_TMP}"/*/plugins/${plugin}-*.conf \ - "$WAF_CRS_DIR/plugins/" 2>/dev/null \ - && echo "postinst: CRS-Plugin ${plugin} installiert" + P_OK="" + # Plugin-Repos nutzen teils 'main', teils 'master' als Default- + # Branch. curl -f (statt still einen 404 als Erfolg zu werten). + for P_BR in main master; do + if curl -fsSL --max-time 45 \ + "https://github.com/coreruleset/${plugin}-plugin/archive/refs/heads/${P_BR}.tar.gz" \ + -o "${P_TMP}/p.tgz" 2>/dev/null \ + && tar xzf "${P_TMP}/p.tgz" -C "${P_TMP}" 2>/dev/null; then + P_OK=1; break fi + done + if [ -n "$P_OK" ] && ls "${P_TMP}"/*/plugins/${plugin}-*.conf >/dev/null 2>&1; then + install -m 0644 "${P_TMP}"/*/plugins/${plugin}-*.conf \ + "$WAF_CRS_DIR/plugins/" 2>/dev/null \ + && echo "postinst: CRS-Plugin ${plugin} installiert" else - echo "postinst: CRS-Plugin ${plugin} Download fehlgeschlagen (kein Internet?)" >&2 + echo "postinst: CRS-Plugin ${plugin} nicht installiert (Download/Layout)" >&2 fi rm -rf "${P_TMP}" done