baseimage-alpine/root/usr/bin/with-contenv
Adam 0d0b87bb49
Fully v3ify edge image (#120)
Co-authored-by: Eric Nemchik <eric@nemchik.com>
2022-08-28 19:06:31 +01:00

10 lines
332 B
Bash
Executable file

#!/bin/bash
if [[ -f /var/run/s6/container_environment/UMASK ]] &&
{ [[ "$(pwdx $$)" =~ "/run/s6/legacy-services/" ]] ||
[[ "$(pwdx $$)" =~ "/run/s6/services/" ]] ||
[[ "$(pwdx $$)" =~ "/servicedirs/svc-" ]]; }; then
umask "$(cat /var/run/s6/container_environment/UMASK)"
fi
exec /command/with-contenv "$@"