isolated-protonmail-bridge/entrypoint.sh

22 lines
348 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BRIDGE="${BRIDGE:-/usr/bin/protonmail-bridge}"
gpg --generate-key --batch gpg-keygen-params.txt
pass init proton
mkfifo input
sleep infinity > input &
$BRIDGE --cli < input &
bridge_pid=$!
echo "login" > input
echo "$BRIDGE_USER" > input
echo "$BRIDGE_PASS" > input
echo "info" > input
wait $bridge_pid