1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-10 07:38:13 -05:00

fix: rm redundant copy to avoid permission errors for non-"app" user

This commit is contained in:
tangowithfoxtrot 2025-03-06 06:50:30 -08:00
parent b0c60ea7ef
commit db2f3e95e1
No known key found for this signature in database
3 changed files with 9 additions and 30 deletions
bitwarden_license/src
src/Identity

@ -59,16 +59,9 @@ if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerber
fi
if [[ $globalSettings__selfHosted == "true" ]]; then
cp /etc/bitwarden/identity/identity.pfx /app/identity.pfx || \
{
# infer a non-root location for the certificate
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
fi
# copy the certificate to the non-root location to avoid permission issues
mkdir -p "$(dirname "$globalSettings__identityServer__certificateLocation")"
cp /etc/bitwarden/identity/identity.pfx "$globalSettings__identityServer__certificateLocation"
}
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
fi
fi
exec $gosu_cmd /app/"${PROJECT_NAME}"

@ -59,16 +59,9 @@ if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerber
fi
if [[ $globalSettings__selfHosted == "true" ]]; then
cp /etc/bitwarden/identity/identity.pfx /app/identity.pfx || \
{
# infer a non-root location for the certificate
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
fi
# copy the certificate to the non-root location to avoid permission issues
mkdir -p "$(dirname "$globalSettings__identityServer__certificateLocation")"
cp /etc/bitwarden/identity/identity.pfx "$globalSettings__identityServer__certificateLocation"
}
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
fi
fi
exec $gosu_cmd /app/"${PROJECT_NAME}"

@ -59,16 +59,9 @@ if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerber
fi
if [[ $globalSettings__selfHosted == "true" ]]; then
cp /etc/bitwarden/identity/identity.pfx /app/identity.pfx || \
{
# infer a non-root location for the certificate
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
fi
# copy the certificate to the non-root location to avoid permission issues
mkdir -p "$(dirname "$globalSettings__identityServer__certificateLocation")"
cp /etc/bitwarden/identity/identity.pfx "$globalSettings__identityServer__certificateLocation"
}
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
fi
fi
exec $gosu_cmd /app/"${PROJECT_NAME}"