mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-28 16:58:03 +01:00
Update acme.sh & fix duckdns (#4560)
* fix dialog info * acme.sh 3.0.7 * use fake email if none given * format email correct * adressing #2255
This commit is contained in:
parent
4932495daa
commit
c0d07013fc
5 changed files with 41 additions and 44 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
- New: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540)
|
||||
- Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4)
|
||||
- Update: acme.sh 3.0.7 (repair duckdns.org dyndns)
|
||||
- Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082)
|
||||
- Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589)
|
||||
|
||||
|
|
|
@ -622,9 +622,9 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort):
|
|||
if lastusedShop == choice_url_ip2torcom: lastusedShop=""
|
||||
|
||||
# FULMO Shop
|
||||
choice_url_fulmo="fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion"
|
||||
choices.append(("B", "Fulmo Shop"))
|
||||
if lastusedShop == choice_url_fulmo: lastusedShop=""
|
||||
#choice_url_fulmo="fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion"
|
||||
#choices.append(("B", "Fulmo Shop"))
|
||||
#if lastusedShop == choice_url_fulmo: lastusedShop=""
|
||||
|
||||
# add before option if different from static options
|
||||
if len(lastusedShop) > 0: choices.append(("Y", lastusedShop))
|
||||
|
|
|
@ -334,8 +334,10 @@ def subscriptions_cancel(s_id):
|
|||
|
||||
print(json.dumps(subs, indent=2))
|
||||
|
||||
# todo: deinstall letsencrypt if this was last subscription
|
||||
|
||||
# deinstall letsencrypt/dyndns if this was last subscription
|
||||
if len(subs['subscriptions_letsencrypt']) == 0:
|
||||
os.system("/home/admin/config.scripts/bonus.letsencrypt.sh off")
|
||||
os.system("/home/admin/config.scripts/internet.dyndomain.sh off")
|
||||
|
||||
def get_subscription(subscription_id):
|
||||
try:
|
||||
|
|
|
@ -268,8 +268,8 @@ def main():
|
|||
cfg.reload()
|
||||
if not cfg.run_behind_tor.value:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
The IP2TOR service just makes sense if you run
|
||||
your RaspiBlitz behind TOR.
|
||||
The IP2TOR service just makes sense if you
|
||||
run your RaspiBlitz behind TOR.
|
||||
''', title="Info")
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ fi
|
|||
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
ACME_LOAD_BASE_URL="https://codeload.github.com/acmesh-official/acme.sh/tar.gz"
|
||||
ACME_VERSION="2.8.6"
|
||||
# https://github.com/acmesh-official/acme.sh/releases
|
||||
ACME_LOAD_BASE_URL="https://github.com/acmesh-official/acme.sh/archive/refs/tags/3.0.7.tar.gz"
|
||||
ACME_VERSION="3.0.7"
|
||||
|
||||
ACME_INSTALL_HOME="/home/admin/.acme.sh"
|
||||
ACME_CONFIG_HOME="/mnt/hdd/app-data/letsencrypt"
|
||||
|
@ -21,19 +22,6 @@ ACME_CERT_HOME="${ACME_CONFIG_HOME}/certs"
|
|||
|
||||
ACME_IS_INSTALLED=0
|
||||
|
||||
# if Tor is on test that CURL is by default running over Tor
|
||||
# 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
|
||||
###################
|
||||
|
@ -70,7 +58,15 @@ function acme_status() {
|
|||
}
|
||||
|
||||
function acme_install() {
|
||||
|
||||
email="${1}"
|
||||
# create a dummy email if none is provided
|
||||
if [ -z "${email}" ]; then
|
||||
random_number=$(shuf -i 100-999 -n 1)
|
||||
random_word=$(shuf -n 1 /usr/share/dict/words)
|
||||
ending="x.com"
|
||||
email="${random_word}${random_number}@gm${ending}"
|
||||
fi
|
||||
|
||||
# ensure socat
|
||||
if ! command -v socat >/dev/null; then
|
||||
|
@ -79,41 +75,38 @@ function acme_install() {
|
|||
sudo apt-get install -y socat >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# make sure config directory exists
|
||||
if ! [ -d $ACME_CONFIG_HOME ]; then
|
||||
sudo mkdir -p $ACME_CONFIG_HOME
|
||||
fi
|
||||
sudo chown admin:admin $ACME_CONFIG_HOME
|
||||
|
||||
rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz"
|
||||
if ! curl --silent --fail -o "/tmp/acme.sh_${ACME_VERSION}.tar.gz" "${ACME_LOAD_BASE_URL}/${ACME_VERSION}" 2>&1; then
|
||||
echo "Error ($?): Download failed from: ${ACME_LOAD_BASE_URL}/${ACME_VERSION}"
|
||||
rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz"
|
||||
# download and install acme.sh
|
||||
echo "# download acme.sh release ${ACME_VERSION} from ${ACME_LOAD_BASE_URL}"
|
||||
rm -r /tmp/acme.sh* 2>/dev/null
|
||||
if ! curl -L --silent --fail -o "/tmp/acme.sh.tar.gz" "${ACME_LOAD_BASE_URL}" 2>&1; then
|
||||
echo "Error ($?): Download failed from: ${ACME_LOAD_BASE_URL}"
|
||||
rm -r /tmp/acme.sh*
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if tar xzf "/tmp/acme.sh_${ACME_VERSION}.tar.gz" -C /tmp/; then
|
||||
if tar xzf "/tmp/acme.sh.tar.gz" -C /tmp/; then
|
||||
cd "/tmp/acme.sh-${ACME_VERSION}" || exit
|
||||
|
||||
if [ -n "${email}" ]; then
|
||||
echo "# installing acme.sh with email(${email})"
|
||||
./acme.sh --install \
|
||||
--noprofile \
|
||||
--home "${ACME_INSTALL_HOME}" \
|
||||
--config-home "${ACME_CONFIG_HOME}" \
|
||||
--cert-home "${ACME_CERT_HOME}" \
|
||||
--accountemail "${email}"
|
||||
|
||||
else
|
||||
./acme.sh --install \
|
||||
--noprofile \
|
||||
--home "${ACME_INSTALL_HOME}" \
|
||||
--config-home "${ACME_CONFIG_HOME}" \
|
||||
--cert-home "${ACME_CERT_HOME}"
|
||||
echo "# Error ($?): Extracting failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz"
|
||||
rm -Rf "/tmp/acme.sh_${ACME_VERSION}"
|
||||
|
||||
rm -r /tmp/acme.sh*
|
||||
}
|
||||
|
||||
function refresh_certs_with_nginx() {
|
||||
|
@ -219,6 +212,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||
sudo chmod -R 733 $ACME_CONFIG_HOME
|
||||
|
||||
# install the acme script
|
||||
echo "# acme_install"
|
||||
acme_install "${address}"
|
||||
echo ""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue