From a19e2578bf0a9cc3aedf4e027b6a6049cf452c89 Mon Sep 17 00:00:00 2001 From: Franscobec Date: Fri, 10 Apr 2026 13:38:46 -0400 Subject: [PATCH] Update autoremakessh --- autoremakessh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/autoremakessh b/autoremakessh index 048706a..490f7e4 100644 --- a/autoremakessh +++ b/autoremakessh @@ -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 }