More install scripts

This commit is contained in:
2026-03-14 19:40:46 +00:00
parent 2de91ed77b
commit 10939f2ea3
3 changed files with 31 additions and 8 deletions

View File

@@ -1,9 +1,32 @@
#! /bin/zsh
enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -sort copy "Firefox"
echo "-------------------------------------"
echo "Browser Setup Script"
echo "-------------------------------------"
firefox "https://accounts.firefox.com/signin?action=email&service=sync" &
echo "Checking if firefox is already synced"
if [[ -d "$HOME/.mozilla/firefox" && -n "$(find "$HOME/.mozilla/firefox" -name "places.sqlite" -print -quit)" ]]; then
echo "Firefox profile detected. Skipping sync."
exit 0
fi
FIREFOX=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Firefox" | sed 's/\\/\\\\/g') # Escaping backslashes for jq
FIREFOXUN=$(echo "$FIREFOX" | jq -r '.[].login')
FIREFOXPW=$(echo "$FIREFOX" | jq -r '.[].password')
echo -n "$FIREFOXUN" | wl-copy
station-launch-browser "https://accounts.firefox.com/signin?action=email&service=sync"
zenity --title="Firefox Setup" \
--info \
--text="Email copied.\nPress OK for password" \
|| gum confirm "You closed the dialog, do you want to continue?" \
|| exit 1
echo -n "$FIREFOXPW" | wl-copy
read -s -k $'?Press enter when you have synced Firefox...\n'
echo "" | wl-copy
echo -n "" | wl-copy

View File

@@ -23,5 +23,5 @@ done
"$HOME/.local/bin/station-install/ssh.sh"
"$HOME/.local/bin/station-install/server.sh"
# "$HOME/.local/bin/station-install/firefox.sh"
"$HOME/.local/bin/station-install/firefox.sh"
# "$HOME/.local/bin/station-install/nextcloud.sh"

View File

@@ -5,9 +5,9 @@ echo "Server Setup Script"
echo "-------------------------------------"
echo "Extracting login details from enpass"
SERVER=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif space" 'select(.label=="New new admin password")')
SERVERUN=$(echo "$LABS" | jq -r '.[].login')
SERVERPW=$(echo "$LABS" | jq -r '.[].password')
SERVER=$(enpass-cli -vault="$HOME/.local/share/Enpass/Enpass/Vaults/primary" -json -sort show "Scarif space" | jq '.[] | select(.label=="New new admin password")')
SERVERUN=$(echo "$SERVER" | jq -r '.login')
SERVERPW=$(echo "$SERVER" | jq -r '.password')
SSHPATH="$HOME/.ssh/id_ed25519" # The path to the SSH key file
SERVERIP="scarif.space"
@@ -21,7 +21,7 @@ KEY=$(cat "$SSHPATH.pub")
echo "~~~~~~~~"
echo "Copying SSH key to server known hosts"
ssh-keyscan -p $SERVERPORT $SERVERIP >> ~/.ssh/known_hosts
ssh-keygen -F $SERVERIP >/dev/null || ssh-keyscan -p $SERVERPORT $SERVERIP >> ~/.ssh/known_hosts
echo "~~~~~~~~"
echo "Checking if key exists on the server"