Update renewkeys.sh
This commit is contained in:
56
renewkeys.sh
56
renewkeys.sh
@@ -14,6 +14,17 @@ exit 1
|
||||
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(){
|
||||
CDN="https://cdn.franscorack.com"
|
||||
echo -e "${CY}Verifying CDN availability...${NF}"
|
||||
@@ -185,19 +196,38 @@ fi
|
||||
if [ -f /root/.ssh/known_hosts ]; then
|
||||
rm /root/.ssh/known_hosts
|
||||
fi
|
||||
if [ "$PC" = "pve01" ]
|
||||
then
|
||||
verifycdn
|
||||
guardband
|
||||
rootcheck
|
||||
guardband
|
||||
else
|
||||
verifycdn
|
||||
guardband
|
||||
rootcheck
|
||||
guardband
|
||||
admincheck
|
||||
guardband
|
||||
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" ]
|
||||
then
|
||||
verifycdn
|
||||
guardband
|
||||
rootcheck
|
||||
guardband
|
||||
else
|
||||
verifycdn
|
||||
guardband
|
||||
rootcheck
|
||||
guardband
|
||||
admincheck
|
||||
guardband
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
echo -e "${CG}Script execution completed.${NF}"
|
||||
|
||||
Reference in New Issue
Block a user