Update autoremakessh
This commit is contained in:
@@ -24,11 +24,28 @@ if [[ $1 = "--trigger" ]]; then
|
|||||||
echo "auto - For automated triggering of autoremakessh"
|
echo "auto - For automated triggering of autoremakessh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Possible Options:"
|
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"
|
echo "-r - Resets .ssh folder of the selected user in the active config"
|
||||||
|
|
||||||
fi
|
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() {
|
guardband() {
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${CR}Script Exited with an Error.${NF}"
|
echo -e "${CR}Script Exited with an Error.${NF}"
|
||||||
@@ -52,6 +69,8 @@ checksums(){
|
|||||||
if [[ $disablechecksums = "0" ]]; then
|
if [[ $disablechecksums = "0" ]]; then
|
||||||
serversidePUB=$(wget $server/$checksumdir/$priv -q -O -)
|
serversidePUB=$(wget $server/$checksumdir/$priv -q -O -)
|
||||||
serversidePRIV=$(wget $server/$checksumdir/$pub -q -O -)
|
serversidePRIV=$(wget $server/$checksumdir/$pub -q -O -)
|
||||||
|
else
|
||||||
|
echo -e ${CY}Skipping checksum verification${NF}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user