39 lines
1.0 KiB
Bash
Executable File
39 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# this script will setup the keyring
|
|
# for any user being created from /etc/skel
|
|
# only after a valid internet connection is made
|
|
|
|
do_setup() {
|
|
keys=(
|
|
AEFB411B072836CD48FF0381AE252C284B5DBA5D
|
|
9E4F11C6A072942A7B3FD3B0B81EB14A09A25EB0
|
|
35F52A02854DCCAEC9DD5CC410443C7F54B00041
|
|
)
|
|
sudo dirmngr </dev/null
|
|
sudo pacman-key --init
|
|
sudo pacman-key --populate archlinux
|
|
for k in "${keys[@]}"; do
|
|
if ! grep -q "$k" <<< "$(sudo pacman-key --list-keys)"; then
|
|
gpg --receive-keys "$k"
|
|
sudo pacman-key -r "$k"
|
|
sudo pacman-key --lsign "$k"
|
|
fi
|
|
done
|
|
sudo pacman-key --populate archlabs
|
|
}
|
|
|
|
sleep 2
|
|
if grep -qi 'hypervisor' <<< "$(dmesg)"; then
|
|
$(grep "nitrogen" $HOME/config/openbox/autostart)
|
|
$(grep "polybar" $HOME/.config/openbox/autostart | sed 's/sleep 1; //g')
|
|
fi
|
|
|
|
while ! ping -c1 8.8.8.8 &>/dev/null; do
|
|
sleep 1
|
|
done
|
|
|
|
do_setup
|
|
sed -i '/keypack/d' "$HOME/.config/openbox/autostart"
|
|
rm -f "$HOME/.config/keypack"
|