- 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
- ./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
command_help() {
echo "Usage: ${0} [-h] [command [argument]] [parameter [argument]] [parameter [argument]] ..."
echo
- echo "Default command: cron"
+ echo "Default command: help"
echo
(
echo "Commands:"
done
if [[ -z "${COMMAND}" ]]; then
- COMMAND="cron"
+ command_help
+ exit 1
fi
init_system