42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
echo "-------------------------------------"
|
|
echo "Enpass Setup Script"
|
|
echo "-------------------------------------"
|
|
|
|
export MASTERPW=$(gum input --header="Enpass Master password" --password)
|
|
|
|
echo "stofflees@gmail.com" | wl-copy
|
|
|
|
station-launch-password-manager
|
|
|
|
zenity --title="Enpass Setup" \
|
|
--info \
|
|
--text="Email copied.\nPress OK when it asks for webdav URL" \
|
|
|| gum confirm "You closed the dialog, do you want to continue?" \
|
|
|| exit 1
|
|
|
|
echo "https://tower.scarif.space" | wl-copy
|
|
|
|
zenity --title="Enpass Setup" \
|
|
--info \
|
|
--text="Tower URL copied.\nPress OK when it asks for master password" \
|
|
|| gum confirm "You closed the dialog, do you want to continue?" \
|
|
|| exit 1
|
|
|
|
echo "$MASTERPW" | wl-copy
|
|
|
|
read -n 1 -r -s -p $'Press enter when you have synced enpass...\n'
|
|
|
|
wl-copy --clear
|
|
|
|
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list 2>&1)
|
|
|
|
while [[ "$CHECKPW" == *level=fatal* ]]; do
|
|
export MASTERPW=$(gum input --header="Enpass Master password (incorrect, try again)" --password")
|
|
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list)
|
|
done
|
|
|
|
echo "Password set successfuly"
|
|
|