From 4bb204f2875a803ead5423a60103b3a9d6965690 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Wed, 2 Aug 2023 10:57:31 +0100 Subject: [PATCH] Run under root by default unless ODK_USER_ID is explicitly set. Change the entry point script so that it defaults to run the inner processes as root, unless the ODK_USER_ID variable is explicitly set to something else than zero. This avoids breaking things for users who for some reasons do not pass the `ODK_USER_ID` variable when they invoke the ODK -- which includes Windows users, since the `run.bat` script has never been updated to pass that variable. --- scripts/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 06584810..e34fd1e0 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ x$ODK_USER_ID = x0 ]; then +if [ -z "$ODK_USER_ID" -o "$ODK_USER_ID" = 0 ]; then exec "$@" fi