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,6 +196,24 @@ 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 [[ $1 = "--fix" ]]; then
if [ "$PC" = "pve01" ]
then
cleanup --pve01
verifycdn
guardband
rootcheck
guardband
else
cleanup
verifycdn
guardband
rootcheck
guardband
admincheck
guardband
fi
else
if [ "$PC" = "pve01" ] if [ "$PC" = "pve01" ]
then then
verifycdn verifycdn
@@ -199,5 +228,6 @@ guardband
admincheck admincheck
guardband guardband
fi fi
fi
sleep 2 sleep 2
echo -e "${CG}Script execution completed.${NF}" echo -e "${CG}Script execution completed.${NF}"