From 07683c2ba75a1bfc06c84b4d570dfdb6f4904560 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Wed, 25 Jun 2014 10:09:20 -0400 Subject: Give a better help message when run without arguments. --- check_sign_aide.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/check_sign_aide.sh b/check_sign_aide.sh index 7549b33..87eebea 100755 --- a/check_sign_aide.sh +++ b/check_sign_aide.sh @@ -1,8 +1,15 @@ #!/bin/bash -if [ ! $1 ]; then - echo "You must at least provide an argument for which action to take." - exit +if [ "$#" -lt 1 ]; then + echo -e "\nYou must at least provide an argument for which action to take.\n" + echo -e "Usage:\n" + echo -e " $ ./check_sign_aide.sh [host [host] ...]\n" + echo -e "Action must be one of:\n" + echo -e " * check - verify signatures of core AIDE files" + echo -e " * sign - sign core AIDE files" + echo -e " * copydb - overwrite old AIDE database with new one, and sign it\n" + echo -e "If no host is specified, then all configured hosts will receive .\n" + exit fi DOMAIN="example.com" -- cgit v1.2.3