Update autoremakessh

This commit is contained in:
2026-05-19 18:44:25 -04:00
parent 028833e2b0
commit b978da8093

View File

@@ -6,33 +6,33 @@ CR="\e[38;5;9m"
CY="\033[38;5;226m" CY="\033[38;5;226m"
echo "" echo ""
echo "AutoremakeSSH Version MR20260410-Dev1" echo "AutoremakeSSH Version 20260410-0"
echo "© 2026 Franscobec - AGPLv3 License" echo "© 2026 Franscobec - AGPLv3 License"
echo "https://git.franscorack.com/Franscobec/AutoremakeSSH/src/branch/main/" echo "https://git.franscorack.com/Franscobec/AutoremakeSSH/src/branch/main/"
echo "" echo ""
if [[ $1 = "--trigger" ]]; then if [[ $1 = "--server" ]]; then
echo test
elif [[ $1 = "--auto" ]]; then
echo test echo test
elif [[ $1 = "-h" ]]; then
echo "Usage:"
echo "autoremakessh [MODE] [OPTIONS]
echo ""
echo "Possible modes:"
echo "Default (No Arg) - Client mode"
echo "--server - Server mode
echo "Possible Options:"
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 "-h - Display this message"
else else
echo "Usage:" echo test
echo "autoremakessh --MODE [OPTIONS]"
echo ""
echo "Possible Modes:"
echo "trigger - For manual triggering of autoremakessh"
echo "auto - For automated triggering of autoremakessh"
echo ""
echo "Possible Options:"
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 fi
verifydefaultconfigpresence(){ verifydefaultconfigpresence(){
if [[ -f "$config" = "/opt/autoremakessh/client/defaultconfig" ]]; then if [[ -f "$config" = "/opt/autoremakessh/client/defaultconfig" ]]; then
if [ ! -f /opt/autoremakessh/client/defaultconfig ]; then if [ ! -f /opt/autoremakessh/client/defaultconfig ]; then
echo -e ${CR}No default config found!${NF} echo -e ${CR}No default config found! Use -h argument for help.${NF}
return 1 return 1
fi fi
fi fi