#!/bin/bash
#
CMD=$(basename $0)
CMDVER="1.1"
CMDSTR="$CMD v$CMDVER (2021-10-24)"

set -e -u

usage()
{
	echo "
== $CMDSTR == run certbot-auto with default options ==

usage: $CMD .. any certbot-auto options ..


these options wille be *always* prepended:

    $default_options

  (use   kusa-conf --dump certbot   for details)

HINTS

  $CMD certificates
  	list owned certificates

  $CMD renew
  	you must manually install them if renewed; to
	automate the task run

	   ./certbot-new renew

	(see /etc/cron.weekly/certbot-renew for details)
" >&2
	exit 1
}


# (MAIN)


# settings are taken from kusa-db:
#
# default_options="\::certbot.default_options\::"
#
default_options="::certbot.options::"

[ $# = 0 ] && usage

exec ./certbot-auto $default_options "$@"
