baseimage-alpine/root/usr/bin/with-contenv
2022-06-20 20:04:08 -04:00

10 lines
329 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 "$@"