mirror of
https://github.com/bitwarden/server.git
synced 2025-04-20 04:28: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
|
fi
|
||||||
|
|
||||||
if [[ $globalSettings__selfHosted == "true" ]]; then
|
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
|
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
|
||||||
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
|
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
|
||||||
fi
|
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"
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
||||||
|
@ -59,16 +59,9 @@ if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerber
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $globalSettings__selfHosted == "true" ]]; then
|
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
|
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
|
||||||
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
|
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
|
||||||
fi
|
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"
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
||||||
|
@ -59,16 +59,9 @@ if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerber
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $globalSettings__selfHosted == "true" ]]; then
|
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
|
if [[ -z $globalSettings__identityServer__certificateLocation ]]; then
|
||||||
export globalSettings__identityServer__certificateLocation=/home/app/config/identity.pfx
|
export globalSettings__identityServer__certificateLocation=/etc/bitwarden/identity/identity.pfx
|
||||||
fi
|
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"
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
exec $gosu_cmd /app/"${PROJECT_NAME}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user