[__letsencrypt_cert] Simplify derivation of python path.

This also supports odd setups with '!' in the path.
This commit is contained in:
evilham 2021-02-07 20:19:50 +01:00
parent 9ba9dceb1a
commit 01c9f79357

View file

@ -6,7 +6,7 @@ certificate_is_test="no"
if [ -n "${certbot_path}" ]; then
# Find python executable that has access to certbot's module
python_path="$(head -n 1 "${certbot_path}" | cut -d '!' -f 2)"
python_path=$(sed -n '1s/^#! *//p' "${certbot_path}")
# Use a lock for cdist due to certbot not exiting with failure
# or having any flags for concurrent use.