From 342e9d80b7666cd64ef6267b7d358c10c48a9267 Mon Sep 17 00:00:00 2001 From: Gitouche Date: Sat, 21 Dec 2024 22:50:08 +0100 Subject: [PATCH] privatebin gestion conf.php --- podman-privatebin/10_install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/podman-privatebin/10_install.sh b/podman-privatebin/10_install.sh index a3a79e0..c0b17ac 100755 --- a/podman-privatebin/10_install.sh +++ b/podman-privatebin/10_install.sh @@ -15,12 +15,19 @@ fi if ! podman image exists "${privatebin_image}":"${privatebin_version}"; then podman image pull "${privatebin_image}":"${privatebin_version}" || exit 1 fi + +sha=$(skopeo inspect docker://"${privatebin_image}":"${privatebin_version}" | jq -r '.Labels."org.opencontainers.image.revision"') +curl -so ${HOME}/conf.php https://raw.githubusercontent.com/PrivateBin/PrivateBin/${sha}/cfg/conf.sample.php +# disable never expire option +sed_in_place "never = 0" ";never = 0" ${HOME}/conf.php + podman container run -d --read-only --name ${container_name} \ -p ${listen_if}:${listen_port}:8080 \ --mount=type=tmpfs,destination=/run,U=true \ --mount=type=tmpfs,destination=/tmp \ --mount=type=tmpfs,destination=/var/lib/nginx/tmp,U=true \ -v ${srvdata_volume}:/srv/data:U,Z \ + -v ${HOME}/conf.php:/srv/cfg/conf.php:U,Z,ro \ "${privatebin_image}":"${privatebin_version}" && ( podman container logs -f ${container_name} 2>&1 & ) | grep -q 'NOTICE: ready to handle connections' && podman container stop ${container_name} &&