Files
dotfiles/.local/bin/station-install/password-manager.sh

43 lines
1.1 KiB
Bash
Raw Normal View History

2026-03-14 16:07:57 +00:00
#! /bin/bash
echo "-------------------------------------"
echo "Enpass Setup Script"
echo "-------------------------------------"
2026-03-14 19:15:38 +00:00
if [[ -z $MASTERPW ]]; then
export MASTERPW=$(gum input --header="Enpass Master password" --password)
fi
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
VAULT_DIR="$HOME/.local/share/Enpass/Enpass/Vaults/primary"
2026-03-14 17:48:40 +00:00
2026-03-14 19:15:38 +00:00
if [ -f "$VAULT_DIR/vault.enpassdb" ]; then
echo "Vault already exists, skipping Enpass setup."
else
echo -n "stofflees@gmail.com" | wl-copy
2026-03-14 17:48:40 +00:00
2026-03-14 19:15:38 +00:00
station-launch-password-manager
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
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
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
echo -n "https://tower.scarif.space" | wl-copy
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
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
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
echo -n "$MASTERPW" | wl-copy
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
read -n 1 -r -s -p $'Press enter when you have synced enpass...\n'
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
wl-copy --clear
2026-03-14 16:07:57 +00:00
2026-03-14 19:15:38 +00:00
echo "Enpass setup complete."
fi
2026-03-14 16:07:57 +00:00