mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 20:16:22 +02:00
committed by
rootzoll
parent
0dfa3fce4d
commit
226f14e8c6
@@ -208,6 +208,15 @@ def dynu_update(domain, token, ip):
|
|||||||
#####################
|
#####################
|
||||||
|
|
||||||
def subscriptions_new(ip, dnsservice, domain, token, target):
|
def subscriptions_new(ip, dnsservice, domain, token, target):
|
||||||
|
|
||||||
|
# check if already one subscrption exists (limit to just one)
|
||||||
|
# https://github.com/rootzoll/raspiblitz/issues/1786
|
||||||
|
if Path(SUBSCRIPTIONS_FILE).is_file():
|
||||||
|
subs = toml.load(SUBSCRIPTIONS_FILE)
|
||||||
|
if "subscriptions_letsencrypt" in subs:
|
||||||
|
if len(subs['subscriptions_letsencrypt']) > 0:
|
||||||
|
raise BlitzError("not more than one letsencrypt subscription", "cancel existing letsencrypt first")
|
||||||
|
|
||||||
# domain needs to be the full domain name
|
# domain needs to be the full domain name
|
||||||
if domain.find(".") == -1:
|
if domain.find(".") == -1:
|
||||||
raise BlitzError("not a fully qualified domain name", domain)
|
raise BlitzError("not a fully qualified domain name", domain)
|
||||||
|
Reference in New Issue
Block a user