Update autoremakessh

This commit is contained in:
2026-04-10 13:38:46 -04:00
parent 1f63e96570
commit a19e2578bf

View File

@@ -24,11 +24,28 @@ if [[ $1 = "--trigger" ]]; then
echo "auto - For automated triggering of autoremakessh"
echo ""
echo "Possible Options:"
echo "-c [FILE] - Configuration file to use (Default /opt/autoremakessh/client/default)"
echo "-c [FILE] - Configuration file to use (Default /opt/autoremakessh/client/defaultconfig)"
echo "-r - Resets .ssh folder of the selected user in the active config"
fi
verifydefaultconfigpresence(){
if [[ -f "$config" = "/opt/autoremakessh/client/defaultconfig" ]]; then
if [ ! -f /opt/autoremakessh/client/defaultconfig ]; then
echo -e ${CR}No default config found!${NF}
return 1
fi
fi
}
verifyconfigvalidity(){
if [ ! -f $config ]; then
echo -e ${CR}Invalid config file location or permissions${NF}
return 1
fi
}
guardband() {
if [ $? -ne 0 ]; then
echo -e "${CR}Script Exited with an Error.${NF}"
@@ -52,6 +69,8 @@ checksums(){
if [[ $disablechecksums = "0" ]]; then
serversidePUB=$(wget $server/$checksumdir/$priv -q -O -)
serversidePRIV=$(wget $server/$checksumdir/$pub -q -O -)
else
echo -e ${CY}Skipping checksum verification${NF}
fi
}