From 468d5eb0d81a42dfbc0029ea65d52f64ef710767 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:01:43 +0200 Subject: [PATCH] Create with-contenv --- guacamole/usr/bin/with-contenv | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 guacamole/usr/bin/with-contenv diff --git a/guacamole/usr/bin/with-contenv b/guacamole/usr/bin/with-contenv new file mode 100644 index 000000000..2e173ca93 --- /dev/null +++ b/guacamole/usr/bin/with-contenv @@ -0,0 +1,15 @@ +#!/bin/bash + +# Use /bin/bash shebang because we don't want the container environment in here + +# Version 1 +# 2024-10-18 - Initial Release +WITHCONTENV_VER="1.20241018" + +if [[ -f /run/s6/container_environment/UMASK ]] && + { [[ "$(pwdx $$)" =~ "/run/s6/legacy-services/" ]] || + [[ "$(pwdx $$)" =~ "/run/s6/services/" ]] || + [[ "$(pwdx $$)" =~ "/servicedirs/svc-" ]]; }; then + umask "$(cat /run/s6/container_environment/UMASK)" +fi +exec /command/with-contenv "$@"