Improve install

This commit is contained in:
2026-03-14 16:07:57 +00:00
parent 673748402a
commit dbeb4d02a4
5 changed files with 156 additions and 21 deletions

View File

@@ -1,21 +1,22 @@
#! /bin/bash
export MASTERPW=$(gum input --header="Master password" --password)
echo "-------------------------------------"
echo "Password Setup Script"
echo "-------------------------------------"
Enpass &
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=$(zenity --password)
CHECKPW=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort list)
done
echo "Password set successfuly"
if gum confirm "Do you need to change your password?"; then
while true; do
if passwd; then
echo "Password successfully updated."
break
else
echo "Failed to update password."
if ! gum confirm "Would you like to try again?"; then
break
fi
fi
done
else
echo "Password change skipped."
fi