Update for bridge 3.0.x.

This commit is contained in:
michael 2023-02-02 07:48:00 -06:00
parent 9d5ead578d
commit 6db0b9271c
3 changed files with 42 additions and 25 deletions

View file

@ -9,13 +9,11 @@ GROUP=proton
if getent group $GROUP_ID > /dev/null; then
echo "Using group $GROUP with GID $GROUP_ID..."
GROUP=$(getent group $GROUP_ID | cut -d: -f1)
echo "Using group $GROUP with GID $GROUP_ID..."
else
echo "Adding group $GROUP with GID $GROUP_ID..."
addgroup -g $GROUP_ID $GROUP
fi
echo "Adding user proton with group $GROUP..."
echo adduser -D -u $USER_ID -G $GROUP -h /var/lib/proton -s /bin/sh proton
echo "Adding user proton ($USER_ID) with group $GROUP ${GROUP_ID}..."
adduser -D -u $USER_ID -G $GROUP -h /var/lib/proton -s /bin/sh proton
chown -R ${USER_ID}:${GROUP_ID} /var/lib/proton
export HOME=/var/lib/proton
@ -27,4 +25,5 @@ setcap 'cap_net_bind_service=+ep' /usr/bin/socat
socat TCP-LISTEN:25,fork TCP:127.0.0.1:1025 &
socat TCP-LISTEN:143,fork TCP:127.0.0.1:1143 &
exec /sbin/su-exec proton "$@"
echo "Starting ProtonMail Bridge..."
exec /usr/sbin/gosu proton "$@"