From 01c9f793576811ef1b167a58f79e82aeabb45b78 Mon Sep 17 00:00:00 2001 From: Evilham Date: Sun, 7 Feb 2021 20:19:50 +0100 Subject: [PATCH] [__letsencrypt_cert] Simplify derivation of python path. This also supports odd setups with '!' in the path. --- cdist/conf/type/__letsencrypt_cert/explorer/certificate-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-data b/cdist/conf/type/__letsencrypt_cert/explorer/certificate-data index 13f0d4d1..ff62e742 100755 --- a/cdist/conf/type/__letsencrypt_cert/explorer/certificate-data +++ b/cdist/conf/type/__letsencrypt_cert/explorer/certificate-data @@ -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.