mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-21 07:51:26 +02:00
use absolute path of script directory as default BASEDIR, remove trailing slash from BASEDIR
This commit is contained in:
@@ -4,7 +4,7 @@ set -e
|
|||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# default config values
|
# Default config values
|
||||||
CA="https://acme-v01.api.letsencrypt.org"
|
CA="https://acme-v01.api.letsencrypt.org"
|
||||||
LICENSE="https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf"
|
LICENSE="https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf"
|
||||||
HOOK_CHALLENGE=
|
HOOK_CHALLENGE=
|
||||||
@@ -12,12 +12,16 @@ RENEW_DAYS="14"
|
|||||||
KEYSIZE="4096"
|
KEYSIZE="4096"
|
||||||
WELLKNOWN=".acme-challenges"
|
WELLKNOWN=".acme-challenges"
|
||||||
PRIVATE_KEY_RENEW=no
|
PRIVATE_KEY_RENEW=no
|
||||||
BASEDIR="./"
|
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
if [[ -e "config.sh" ]]; then
|
# If exists load config from same directory as this script
|
||||||
. ./config.sh
|
if [[ -e "${BASEDIR}/config.sh" ]]; then
|
||||||
|
. "${BASEDIR}/config.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove slash from end of BASEDIR. Mostly for cleaner outputs, doesn't change functionality.
|
||||||
|
BASEDIR="${BASEDIR%%/}"
|
||||||
|
|
||||||
umask 077 # paranoid umask, we're creating private keys
|
umask 077 # paranoid umask, we're creating private keys
|
||||||
|
|
||||||
anti_newline() {
|
anti_newline() {
|
||||||
|
|||||||
Reference in New Issue
Block a user