This commit is contained in:
Valeria Fadeeva 2023-11-29 03:02:27 +05:00
parent b0a8a1b684
commit 423d8d64e6
1 changed files with 14 additions and 8 deletions

View File

@ -8,6 +8,9 @@ else
echo "USER IS ROOT" echo "USER IS ROOT"
fi fi
ping -c 1 1.1.1.1 > /dev/null
have_internet="$?"
# sleep 1 # sleep 1
cd "/root" cd "/root"
@ -22,21 +25,24 @@ pkill haveged
pacman-key --populate archlinux melawy-linux endeavouros arcolinux chaotic cachyos pacman-key --populate archlinux melawy-linux endeavouros arcolinux chaotic cachyos
pacman-key --lsign-key melawy-linux pacman-key --lsign-key melawy-linux
pacman-key --lsign-key endeavouros pacman-key --lsign-key cachyos
pacman-key --lsign-key arcolinux pacman-key --lsign-key arcolinux
pacman-key --lsign-key chaotic pacman-key --lsign-key chaotic
pacman-key --lsign-key cachyos pacman-key --lsign-key endeavouros
pacman-key --recv-keys valeria@fadeeva.me --keyserver hkps://keys.openpgp.org if [ "$have_internet" -eq 0 ]; then
pacman-key --lsign-key valeria@fadeeva.me pacman-key --recv-keys valeria@fadeeva.me --keyserver hkps://keys.openpgp.org
pacman-key --lsign-key valeria@fadeeva.me
pacman-key --recv-keys key@fadeeva.me --keyserver hkps://keys.openpgp.org pacman-key --recv-keys key@fadeeva.me --keyserver hkps://keys.openpgp.org
pacman-key --lsign-key key@fadeeva.me pacman-key --lsign-key key@fadeeva.me
fi
pacman-key --updatedb pacman-key --updatedb
pacman -Syy if [ "$have_internet" -eq 0 ]; then
pacman -Syy
fi
title="Successed!" title="Successed!"
msg="$(date '+%Y.%m.%d %H:%M:%S')" msg="$(date '+%Y.%m.%d %H:%M:%S')"