1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Rework service user (#299)

* Use user primary group if not root

* Do not run getent on MacOS

* Simplify UID/GID management

* Make uid.env backward compatible in run.sh

* Merge install.sh with run.sh to avoid duplicating code

Especially the UID/GID management one

* Generate correct OS name

* Be sure to keep old behavior for backward compatiblilty

* Get the colors back from install.sh
This commit is contained in:
Mart124
2018-05-31 18:05:26 +02:00
committed by Kyle Spearrin
parent 961c0c6749
commit 92b08e6cf1
12 changed files with 222 additions and 464 deletions

View File

@ -172,7 +172,10 @@ 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")) { }
if(!File.Exists("/bitwarden/env/uid.env"))
{
using(var sw = File.CreateText("/bitwarden/env/uid.env")) { }
}
}
}
}