isolated-protonmail-bridge/entrypoint.sh

22 lines
348 B
Bash
Raw Normal View History

2020-05-21 15:11:31 +00:00
#!/usr/bin/env bash
set -euo pipefail
2020-05-22 21:26:34 +00:00
BRIDGE="${BRIDGE:-/usr/bin/protonmail-bridge}"
2020-05-21 15:11:31 +00:00
gpg --generate-key --batch gpg-keygen-params.txt
pass init proton
2020-05-22 21:26:34 +00:00
mkfifo input
sleep infinity > input &
$BRIDGE --cli < input &
bridge_pid=$!
echo "login" > input
echo "$BRIDGE_USER" > input
echo "$BRIDGE_PASS" > input
echo "info" > input
2020-05-22 21:56:28 +00:00
wait $bridge_pid
2020-05-21 15:11:31 +00:00