Merge pull request #12 from adamprice56/main

Update command - Help message
This commit is contained in:
Netvolt Serviços Digitais 2023-07-04 11:10:45 -03:00 committed by GitHub
commit 9e1645e993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -14,8 +14,8 @@ fi
if [[ $1 == "help" ]]; then
echo "There is help but more information is available at github.com/ZoLuSs/rmmagent-script"
echo ""
echo "List of INSTALL/UPDATE argument (no argument name):"
echo "Arg 1: 'install' or 'update'"
echo "List of INSTALL argument (no argument name):"
echo "Arg 1: 'install'"
echo "Arg 2: System type 'amd64' 'x86' 'arm64' 'armv6'"
echo "Arg 3: Mesh agent URL"
echo "Arg 4: API URL"
@ -24,13 +24,15 @@ if [[ $1 == "help" ]]; then
echo "Arg 7: Auth Key"
echo "Arg 8: Agent Type 'server' or 'workstation'"
echo ""
echo "List of UPDATE argument (no argument name)"
echo "Arg 1: 'update'"
echo "Arg 2: System type 'amd64' 'x86' 'arm64' 'armv6'"
echo ""
echo "List of UNINSTALL argument (no argument name):"
echo "Arg 1: 'uninstall'"
echo "Arg 2: Mesh agent FQDN (i.e. mesh.domain.com)"
echo "Arg 3: Mesh agent id (The id needs to have single quotes around it)"
echo ""
echo "Only argument 1 is needed for update"
echo ""
exit 0
fi
@ -46,6 +48,13 @@ if [[ $1 == "install" && $2 == "" ]]; then
exit 1
fi
if [[ $1 == "update" && $2 == "" ]]; then
echo "Argument 2 (System type) is empty !"
echo "Type help for more information"
exit 1
fi
if [[ $1 == "install" && $2 != "amd64" && $2 != "x86" && $2 != "arm64" && $2 != "armv6" ]]; then
echo "This argument can only be 'amd64' 'x86' 'arm64' 'armv6' !"
echo "Type help for more information"