瀏覽代碼

Detect binary location

master
Brielle Bruns 3 年之前
父節點
當前提交
ba24be237b
共有 2 個文件被更改,包括 20 次插入1 次删除
  1. +19
    -1
      gen-cert.sh
  2. +1
    -0
      gen-unifi-cert.sh

+ 19
- 1
gen-cert.sh 查看文件

@@ -30,7 +30,25 @@ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
PROXYAUTH="--standalone --standalone-supported-challenges http-01 --http-01-port 9999"

# Location of LetsEncrypt binary we use
LEBINARY="/usr/src/letsencrypt/certbot-auto"
#LEBINARY="/usr/src/letsencrypt/certbot-auto"

DEFAULTLEBINARY="/usr/bin/certbot /usr/bin/letsencrypt /usr/sbin/certbot
/usr/sbin/letsencrypt /usr/local/bin/certbot /usr/local/sbin/certbot
/usr/local/bin/letsencrypt /usr/local/sbin/letsencrypt
/usr/src/letsencrypt/certbot-auto /usr/src/letsencrypt/letsencrypt-auto
/usr/src/certbot/certbot-auto /usr/src/certbot/letsencrypt-auto
/usr/src/certbot-master/certbot-auto /usr/src/certbot-master/letsencrypt-auto"

if [[ ! -v LEBINARY ]]; then
for i in ${DEFAULTLEBINARY}; do
if [[ -x ${i} ]]; then
LEBINARY=${i}
echo "Found LetsEncrypt/Certbot binary at ${LEBINARY}"
break
fi
done
fi


if [[ ! -x ${LEBINARY} ]]; then
echo "Error: LetsEncrypt binary not found in ${LEBINARY} !"


+ 1
- 0
gen-unifi-cert.sh 查看文件

@@ -36,6 +36,7 @@ if [[ ! -v LEBINARY ]]; then
for i in ${DEFAULTLEBINARY}; do
if [[ -x ${i} ]]; then
LEBINARY=${i}
echo "Found LetsEncrypt/Certbot binary at ${LEBINARY}"
break
fi
done


Loading…
取消
儲存