mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-01-25 16:30:07 +00:00
Merge 2b9894f413 into 044ea2b034
This commit is contained in:
commit
8d94dbd4ba
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
# Workaround for stale gpg-agent socket causing auth failures on restart
|
||||||
|
# Cleans up leftover sockets in the GPG home directory
|
||||||
|
if [ -d /root/.gnupg ]; then
|
||||||
|
rm -f /root/.gnupg/S.gpg-agent*
|
||||||
|
fi
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
if [[ $1 == init ]]; then
|
if [[ $1 == init ]]; then
|
||||||
|
|
||||||
@ -30,6 +36,15 @@ else
|
|||||||
# Fake a terminal, so it does not quit because of EOF...
|
# Fake a terminal, so it does not quit because of EOF...
|
||||||
rm -f faketty
|
rm -f faketty
|
||||||
mkfifo faketty
|
mkfifo faketty
|
||||||
cat faketty | /protonmail/proton-bridge --cli $@
|
|
||||||
|
# Keep faketty open
|
||||||
|
sleep infinity > faketty &
|
||||||
|
|
||||||
|
# Start bridge reading from faketty
|
||||||
|
/protonmail/proton-bridge --cli $@ < faketty &
|
||||||
|
|
||||||
|
# Wait for the bridge to exit
|
||||||
|
wait $!
|
||||||
|
exit $?
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
# Workaround for stale gpg-agent socket causing auth failures on restart
|
||||||
|
# Cleans up leftover sockets in the GPG home directory
|
||||||
|
if [ -d /root/.gnupg ]; then
|
||||||
|
rm -f /root/.gnupg/S.gpg-agent*
|
||||||
|
fi
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
if [[ $1 == init ]]; then
|
if [[ $1 == init ]]; then
|
||||||
|
|
||||||
@ -44,6 +50,15 @@ else
|
|||||||
# Fake a terminal, so it does not quit because of EOF...
|
# Fake a terminal, so it does not quit because of EOF...
|
||||||
rm -f faketty
|
rm -f faketty
|
||||||
mkfifo faketty
|
mkfifo faketty
|
||||||
cat faketty | protonmail-bridge --cli
|
|
||||||
|
# Keep faketty open
|
||||||
|
sleep infinity > faketty &
|
||||||
|
|
||||||
|
# Start bridge reading from faketty
|
||||||
|
protonmail-bridge --cli < faketty &
|
||||||
|
|
||||||
|
# Wait for the bridge to exit
|
||||||
|
wait $!
|
||||||
|
exit $?
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user