Update renewkeys.sh

This commit is contained in:
2026-02-23 19:41:03 -05:00
parent d70e3970ba
commit b098163830

View File

@@ -14,6 +14,17 @@ exit 1
fi fi
} }
cleanup() {
echo -e "${CR}Attention: Script in fix mode - This will reset the .ssh folder. Press CTRL+C ${FB}NOW${NF} ${CR}if you want to avoid this.${NF}"
sleep 5
if [[ $1 = "--pve01" ]]; then
find /root/.ssh/ -type f -delete
else
find /root/.ssh/ -type f -delete
find /home/$USER/.ssh/ -type f -delete
fi
}
verifycdn(){ verifycdn(){
CDN="https://cdn.franscorack.com" CDN="https://cdn.franscorack.com"
echo -e "${CY}Verifying CDN availability...${NF}" echo -e "${CY}Verifying CDN availability...${NF}"
@@ -185,19 +196,38 @@ fi
if [ -f /root/.ssh/known_hosts ]; then if [ -f /root/.ssh/known_hosts ]; then
rm /root/.ssh/known_hosts rm /root/.ssh/known_hosts
fi fi
if [ "$PC" = "pve01" ] if [[ $1 = "--fix" ]]; then
then if [ "$PC" = "pve01" ]
verifycdn then
guardband cleanup --pve01
rootcheck verifycdn
guardband guardband
else rootcheck
verifycdn guardband
guardband else
rootcheck cleanup
guardband verifycdn
admincheck guardband
guardband rootcheck
guardband
admincheck
guardband
fi
else
if [ "$PC" = "pve01" ]
then
verifycdn
guardband
rootcheck
guardband
else
verifycdn
guardband
rootcheck
guardband
admincheck
guardband
fi
fi fi
sleep 2 sleep 2
echo -e "${CG}Script execution completed.${NF}" echo -e "${CG}Script execution completed.${NF}"