From 6cabee56debf1dda44ccb91baebf9ab3cb4f6100 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 27 Mar 2018 15:23:02 -0400 Subject: [PATCH] uid.env file --- scripts/run.sh | 6 ++++++ util/Setup/EnvironmentFileBuilder.cs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/scripts/run.sh b/scripts/run.sh index abfd321dbf..844cea74bd 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -121,6 +121,12 @@ function restart() { dockerComposeDown dockerComposePull updateLetsEncrypt + + if [ $OS == "lin" ] + then + echo "LOCAL_UID=`id -u $USER`" > ../env/uid.env + fi + dockerComposeUp dockerPrune printEnvironment diff --git a/util/Setup/EnvironmentFileBuilder.cs b/util/Setup/EnvironmentFileBuilder.cs index 7d5f30c272..403eddcf2e 100644 --- a/util/Setup/EnvironmentFileBuilder.cs +++ b/util/Setup/EnvironmentFileBuilder.cs @@ -164,6 +164,9 @@ SA_PASSWORD=SECRET } Helpers.Exec("chmod 600 /bitwarden/env/mssql.override.env"); + + // Empty uid env file. Only used on Linux hosts. + using(var sw = File.CreateText("/bitwarden/env/uid.env")) { } } } }