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:
parent
b0c60ea7ef
commit
db2f3e95e1
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user