mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
@@ -46,8 +46,8 @@ cfg.reload()
|
|||||||
|
|
||||||
# todo: make sure that also ACME script uses TOR if activated
|
# todo: make sure that also ACME script uses TOR if activated
|
||||||
session = requests.session()
|
session = requests.session()
|
||||||
if cfg.run_behind_tor.value:
|
# if cfg.run_behind_tor.value:
|
||||||
session.proxies = {'http': 'socks5h://127.0.0.1:9050', 'https': 'socks5h://127.0.0.1:9050'}
|
# session.proxies = {'http': 'socks5h://127.0.0.1:9050', 'https': 'socks5h://127.0.0.1:9050'}
|
||||||
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
|
@@ -22,16 +22,17 @@ ACME_CERT_HOME="${ACME_CONFIG_HOME}/certs"
|
|||||||
ACME_IS_INSTALLED=0
|
ACME_IS_INSTALLED=0
|
||||||
|
|
||||||
# if Tor is on test that CURL is by default running over Tor
|
# if Tor is on test that CURL is by default running over Tor
|
||||||
if [ "${runBehindTor}" == "on" ]; then
|
# TODO: issue https://github.com/rootzoll/raspiblitz/issues/1341
|
||||||
echo "# checking if Tor proxy for CURL is working ..."
|
#if [ "${runBehindTor}" == "on" ]; then
|
||||||
checkTor=$(curl -s https://check.torproject.org | grep -c "Congratulations")
|
# echo "# checking if Tor proxy for CURL is working ..."
|
||||||
if [ ${checkTor} -eq 0 ]; then
|
# checkTor=$(curl -s https://check.torproject.org | grep -c "Congratulations")
|
||||||
echo "err='curl tor proxy not working'"
|
# if [ ${checkTor} -eq 0 ]; then
|
||||||
exit 1
|
# echo "err='curl tor proxy not working'"
|
||||||
else
|
# exit 1
|
||||||
echo "# OK Tor proxy for CURL"
|
# else
|
||||||
fi
|
# echo "# OK Tor proxy for CURL"
|
||||||
fi
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# FUNCTIONS
|
# FUNCTIONS
|
||||||
@@ -139,13 +140,18 @@ function refresh_certs_with_nginx() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
certsDirectories=$(sudo ls ${ACME_CERT_HOME})
|
certsDirectories=$(sudo ls ${ACME_CERT_HOME})
|
||||||
|
echo "# certsDirectories(${certsDirectories})"
|
||||||
directoryArray=(`echo "${certsDirectories}" | tr ' ' ' '`)
|
directoryArray=(`echo "${certsDirectories}" | tr ' ' ' '`)
|
||||||
for i in "${directoryArray[@]}"; do
|
for i in "${directoryArray[@]}"; do
|
||||||
FQDN=$(echo "${i}" | cut -d "_" -f1)
|
FQDN=$(echo "${i}" | cut -d "_" -f1)
|
||||||
|
echo "# i(${i})"
|
||||||
|
echo "# FQDN(${FQDN})"
|
||||||
# check if there is a LetsEncrypt Subscription for this domain
|
# check if there is a LetsEncrypt Subscription for this domain
|
||||||
details=$(/home/admin/config.scripts/blitz.subscriptions.letsencrypt.py subscription-detail $FQDN)
|
details=$(/home/admin/config.scripts/blitz.subscriptions.letsencrypt.py subscription-detail $FQDN)
|
||||||
if [ ${#details} -gt 10 ]; then
|
if [ ${#details} -gt 10 ]; then
|
||||||
|
|
||||||
|
echo "# details(${details})"
|
||||||
|
|
||||||
# get target for that domain
|
# get target for that domain
|
||||||
options=$(echo "${details}" | jq -r ".target")
|
options=$(echo "${details}" | jq -r ".target")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user