Skip to content

Instantly share code, notes, and snippets.

View OliPelz's full-sized avatar

Oliver Pelz OliPelz

View GitHub Profile
@OliPelz
OliPelz / init.sh
Last active March 22, 2023 12:06
prepare vanilla system for ansible provisioning
# set location to fastest german mirror
sudo pacman-mirrors -c Germany
# update complete system
sudo pacman -Syyu --noconfirm
# check if restart is needed after updating
s1=$(pacman -Q linux | sed 's/linux[0-9]* //')
s2=$(uname -r | sed 's/-[A-Z]*$//')
if [ "$s1" == "$s2" ]; then
# NO REBOOT needed
# install essential dependencies to provision with ansiblet
@OliPelz
OliPelz / extract-ssh-keys.sh
Last active March 22, 2023 12:49
load all ssh keys from keepass/passhole and store in local ssh keys
#!/bin/bash
set -e
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo -n Enter password to decrypt keepass file:
read -s keepass_password
# load keepass db for the first time so we can set a password