mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-10 15:12:43 +02:00
added temporary wrapper script for compatibility with old config locations and symlinks, will be removed in a few weeks
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
*Note: This project was renamed from letsencrypt.sh because the original name was violating Let's Encrypts trademark policy. I know that this results in quite a lot of installations failing but I didn't have a choice...*
|
*Note: This project was renamed from letsencrypt.sh because the original name was violating Let's Encrypts trademark policy. I know that this results in quite a lot of installations failing but I didn't have a choice...
|
||||||
|
For now there is a wrapper script for compatibility with old config locations and symlinks, but it will be removed in a few weeks.*
|
||||||
|
|
||||||
This is a client for signing certificates with an ACME-server (currently only provided by letsencrypt) implemented as a relatively simple bash-script.
|
This is a client for signing certificates with an ACME-server (currently only provided by letsencrypt) implemented as a relatively simple bash-script.
|
||||||
|
|
||||||
|
|||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cat >&2 << EOF
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! letsencrypt.sh has been renamed to dehydrated !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
Due to trademark violation letsencrypt.sh had to be renamed and is know called dehydrated.
|
||||||
|
|
||||||
|
To make a clean cut dehydrated doesn't use the old config locations /etc/letsencrypt.sh and
|
||||||
|
/usr/local/etc/letsencrypt.sh anymore, also the script file has been renamed.
|
||||||
|
|
||||||
|
If you were using the default WELLKNOWN location please also update your webserver to use /var/www/dehydrated.
|
||||||
|
|
||||||
|
You are currently running (or reading) a temporary wrapper which handles the old config locations,
|
||||||
|
you should update your setup to use /etc/dehydrated and the 'dehydrated' script file as soon as possible.
|
||||||
|
|
||||||
|
Script execution will continue in 10 seconds.
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# parse given arguments for config
|
||||||
|
tmpargs=("${@}")
|
||||||
|
CONFIG=
|
||||||
|
CONFIGARG=
|
||||||
|
while (( ${#} )); do
|
||||||
|
case "${1}" in
|
||||||
|
--config|-f)
|
||||||
|
shift 1
|
||||||
|
CONFIGARG="${1}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
set -- "${tmpargs[@]}"
|
||||||
|
|
||||||
|
# look for default config locations
|
||||||
|
if [[ -z "${CONFIGARG:-}" ]]; then
|
||||||
|
for check_config in "/etc/letsencrypt.sh" "/usr/local/etc/letsencrypt.sh" "${PWD}" "${SCRIPTDIR}"; do
|
||||||
|
if [[ -f "${check_config}/config" ]]; then
|
||||||
|
CONFIG="${check_config}/config"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# find dehydrated script directory
|
||||||
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||||
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
SOURCE="$(readlink "$SOURCE")"
|
||||||
|
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||||
|
done
|
||||||
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
|
|
||||||
|
# add water
|
||||||
|
if [[ -n "${CONFIG:-}" ]]; then
|
||||||
|
"${DIR}/dehydrated" --config "${CONFIG}" "${@}"
|
||||||
|
else
|
||||||
|
"${DIR}/dehydrated" "${@}"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user