mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 07:07:46 +01:00
parent
be19c565cb
commit
a64c3c2922
2 changed files with 18 additions and 12 deletions
|
@ -46,8 +46,8 @@ cfg.reload()
|
|||
|
||||
# todo: make sure that also ACME script uses TOR if activated
|
||||
session = requests.session()
|
||||
if cfg.run_behind_tor.value:
|
||||
session.proxies = {'http': 'socks5h://127.0.0.1:9050', 'https': 'socks5h://127.0.0.1:9050'}
|
||||
# if cfg.run_behind_tor.value:
|
||||
# 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
|
||||
|
||||
# if Tor is on test that CURL is by default running over Tor
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
echo "# checking if Tor proxy for CURL is working ..."
|
||||
checkTor=$(curl -s https://check.torproject.org | grep -c "Congratulations")
|
||||
if [ ${checkTor} -eq 0 ]; then
|
||||
echo "err='curl tor proxy not working'"
|
||||
exit 1
|
||||
else
|
||||
echo "# OK Tor proxy for CURL"
|
||||
fi
|
||||
fi
|
||||
# TODO: issue https://github.com/rootzoll/raspiblitz/issues/1341
|
||||
#if [ "${runBehindTor}" == "on" ]; then
|
||||
# echo "# checking if Tor proxy for CURL is working ..."
|
||||
# checkTor=$(curl -s https://check.torproject.org | grep -c "Congratulations")
|
||||
# if [ ${checkTor} -eq 0 ]; then
|
||||
# echo "err='curl tor proxy not working'"
|
||||
# exit 1
|
||||
# else
|
||||
# echo "# OK Tor proxy for CURL"
|
||||
# fi
|
||||
#fi
|
||||
|
||||
###################
|
||||
# FUNCTIONS
|
||||
|
@ -139,13 +140,18 @@ function refresh_certs_with_nginx() {
|
|||
fi
|
||||
|
||||
certsDirectories=$(sudo ls ${ACME_CERT_HOME})
|
||||
echo "# certsDirectories(${certsDirectories})"
|
||||
directoryArray=(`echo "${certsDirectories}" | tr ' ' ' '`)
|
||||
for i in "${directoryArray[@]}"; do
|
||||
FQDN=$(echo "${i}" | cut -d "_" -f1)
|
||||
echo "# i(${i})"
|
||||
echo "# FQDN(${FQDN})"
|
||||
# check if there is a LetsEncrypt Subscription for this domain
|
||||
details=$(/home/admin/config.scripts/blitz.subscriptions.letsencrypt.py subscription-detail $FQDN)
|
||||
if [ ${#details} -gt 10 ]; then
|
||||
|
||||
echo "# details(${details})"
|
||||
|
||||
# get target for that domain
|
||||
options=$(echo "${details}" | jq -r ".target")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue