Implement login workflow
This commit is contained in:
parent
e0e0107e13
commit
2debac35b2
@ -1,9 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BRIDGE="${BRIDGE:-/usr/bin/protonmail-bridge}"
|
||||
|
||||
|
||||
gpg --generate-key --batch gpg-keygen-params.txt
|
||||
pass init proton
|
||||
/usr/bin/protonmail-bridge --cli
|
||||
|
||||
# TODO: login on cli
|
||||
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 $!
|
||||
|
||||
|
@ -20,5 +20,7 @@ nsjail -Mo
|
||||
--bindmount_ro /etc/resolv.conf \
|
||||
--env HOME=/home/proton \
|
||||
--env PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin \
|
||||
--env BRIDGE_USER \
|
||||
--env BRIDGE_PASS \
|
||||
-- ${BIN}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user