Update renewkeys.sh

This commit is contained in:
2026-01-31 21:58:41 -05:00
parent dea41f3e8f
commit caaf96cedb

View File

@@ -9,9 +9,6 @@ PC=$(uname -n | awk '{print $1}')
guardband() {
if [ $? -ne 0 ]; then
echo -e "${CY}Cleaning up temp directory for checksums...${NF}"
rm -rf /.SSH/.temp
sleep 2
echo -e "${CR}Script Exited with an Error.${NF}"
exit 1
fi
@@ -26,29 +23,13 @@ if ! wget --spider "$CDN" 2>/dev/null; then
return 1
else
echo -e "${CG}CDN available for checksum downloads - ${FB}Proceeding...${NF}"
serversidePUB=$(wget https://cdn.franscorack.com/chksum/sshprov/pub -q -O -)
serversidePRIV=$(wget https://cdn.franscorack.com/chksum/sshprov/priv -q -O -)
sleep 2
fi
}
downloadpub(){
wget -q https://cdn.franscorack.com/chksum/sshprov/pub -O /.SSH/.temp/pub
if [ $? -ne 0 ]; then
echo -e "${CR}Download error: CDN reported error in file download${NF}"
return 1
fi
}
downloadpriv(){
wget -q https://cdn.franscorack.com/chksum/sshprov/priv -O /.SSH/.temp/priv
if [ $? -ne 0 ]; then
echo -e "${CR}Download error: CDN reported error in file download${NF}"
return 1
fi
}
rootcheck(){
serversidePRIV=$(cat /.SSH/.temp/priv | awk '{print $1}')
serversidePUB=$(cat /.SSH/.temp/pub | awk '{print $1}')
if [ -f /root/.ssh/id_ed25519 ]; then
rootPRIV=$(sha256sum /root/.ssh/id_ed25519 | awk '{print $1}')
else
@@ -207,19 +188,11 @@ if [ "$PC" = "pve01" ]
then
verifycdn
guardband
downloadpub
guardband
downloadpriv
guardband
rootcheck
guardband
else
verifycdn
guardband
downloadpub
guardband
downloadpriv
guardband
rootcheck
guardband
admincheck