From 3c5d3c0fa9527daa160833c10fc54cf30d505937 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 23 Oct 2023 15:53:42 +0200 Subject: [PATCH] bwrap ocsp renew script --- certs/ocsp/renewcerts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/certs/ocsp/renewcerts.sh b/certs/ocsp/renewcerts.sh index 2f3fb3318..f377a1fdd 100755 --- a/certs/ocsp/renewcerts.sh +++ b/certs/ocsp/renewcerts.sh @@ -1,5 +1,14 @@ #!/bin/sh +# bwrap execution environment to avoid port conflicts +if [ "${AM_BWRAPPED-}" != "yes" ]; then + bwrap_path="$(command -v bwrap)" + if [ -n "$bwrap_path" ]; then + export AM_BWRAPPED=yes + exec "$bwrap_path" --cap-add ALL --unshare-net --dev-bind / / "$0" "$@" + fi +fi + check_result(){ if [ $1 -ne 0 ]; then if [ -n "$2" ]; then