From: Lukas Schauer Date: Wed, 16 Dec 2015 11:54:51 +0000 (+0100) Subject: changed default command to 'help' X-Git-Tag: v0.1.0~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ca883dee241d6edd1e885233aec8eab94af8e41;p=thirdparty%2Fdehydrated.git changed default command to 'help' --- diff --git a/.travis.yml b/.travis.yml index 81bfdc9..8fd26d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ before_script: - echo "${TMP_URL}" > domains.txt script: - # check if help command is worling + # check if help command is working - ./letsencrypt.sh --help # move config out of the way and try signing certificate by using temporary config location @@ -33,9 +33,8 @@ script: - ./letsencrypt.sh --domain "${TMP_URL}" -f tmp_config.sh - mv tmp_config.sh config.sh - # run in cron mode (should find a non-expiring certificate) + check running without given mode (should default to cron mode) + # run in cron mode (should find a non-expiring certificate) - ./letsencrypt.sh --cron - - ./letsencrypt.sh # check if certificate is valid in various ways - openssl x509 -in "certs/${TMP_URL}/cert.pem" -noout -text diff --git a/letsencrypt.sh b/letsencrypt.sh index 26403f9..9593b6b 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -470,7 +470,7 @@ command_revoke() { command_help() { echo "Usage: ${0} [-h] [command [argument]] [parameter [argument]] [parameter [argument]] ..." echo - echo "Default command: cron" + echo "Default command: help" echo ( echo "Commands:" @@ -602,7 +602,8 @@ while getopts ":hcer:d:xf:p:" option; do done if [[ -z "${COMMAND}" ]]; then - COMMAND="cron" + command_help + exit 1 fi init_system