Improve install
This commit is contained in:
33
.local/bin/station-install/password-manager.sh
Executable file
33
.local/bin/station-install/password-manager.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "-------------------------------------"
|
||||
echo "Enpass Setup Script"
|
||||
echo "-------------------------------------"
|
||||
|
||||
export MASTERPW=$(gum input --header="Enpass Master password" --password)
|
||||
|
||||
echo "https://tower.scarif.space" | wl-copy
|
||||
|
||||
Enpass &
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user