fix: remove auto-DDNS registration from installer; default to lan mode
Unit Tests / test (push) Successful in 7m27s
Unit Tests / test (push) Successful in 7m27s
install.sh → make setup was registering 'mycell.pic.ngo' with DDNS at install time (before the user ever opened the setup wizard). On a fresh install the user would then open the wizard, choose 'pic1', and get a 401 OTP error because 'mycell' was already registered and the TOTP window had moved on. - Remove the register_with_ddns() call from setup_cell.py main(); DDNS registration now only happens through the setup wizard - Change default DOMAIN_MODE from pic_ngo to lan so a bare 'make setup' no longer generates an ACME Caddyfile or pre-seeds a pic.ngo identity; the wizard collects the real cell name and domain mode from the user make ddns-register still works for manual / scripted deployments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ setup: check-deps
|
|||||||
@sudo chown -R $${SUDO_USER:-$$(id -un)}:$${SUDO_USER:-$$(id -un)} config/ data/ 2>/dev/null || true
|
@sudo chown -R $${SUDO_USER:-$$(id -un)}:$${SUDO_USER:-$$(id -un)} config/ data/ 2>/dev/null || true
|
||||||
CELL_NAME=$(or $(CELL_NAME),mycell) \
|
CELL_NAME=$(or $(CELL_NAME),mycell) \
|
||||||
CELL_DOMAIN=$(or $(CELL_DOMAIN),cell) \
|
CELL_DOMAIN=$(or $(CELL_DOMAIN),cell) \
|
||||||
DOMAIN_MODE=$(or $(DOMAIN_MODE),pic_ngo) \
|
DOMAIN_MODE=$(or $(DOMAIN_MODE),lan) \
|
||||||
CELL_DOMAIN_NAME=$(or $(CELL_DOMAIN_NAME),) \
|
CELL_DOMAIN_NAME=$(or $(CELL_DOMAIN_NAME),) \
|
||||||
CLOUDFLARE_API_TOKEN=$(or $(CLOUDFLARE_API_TOKEN),) \
|
CLOUDFLARE_API_TOKEN=$(or $(CLOUDFLARE_API_TOKEN),) \
|
||||||
DUCKDNS_TOKEN=$(or $(DUCKDNS_TOKEN),) \
|
DUCKDNS_TOKEN=$(or $(DUCKDNS_TOKEN),) \
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ def ensure_session_secret():
|
|||||||
|
|
||||||
DDNS_URL = os.environ.get('DDNS_URL', 'http://ddns.pic.ngo:8080/api/v1')
|
DDNS_URL = os.environ.get('DDNS_URL', 'http://ddns.pic.ngo:8080/api/v1')
|
||||||
DDNS_TOTP_SECRET = os.environ.get('DDNS_TOTP_SECRET', 'S6UMA464YIKM74QHXWL5WELDIO3HFZ6K')
|
DDNS_TOTP_SECRET = os.environ.get('DDNS_TOTP_SECRET', 'S6UMA464YIKM74QHXWL5WELDIO3HFZ6K')
|
||||||
DOMAIN_MODE = os.environ.get('DOMAIN_MODE', 'pic_ngo')
|
DOMAIN_MODE = os.environ.get('DOMAIN_MODE', 'lan')
|
||||||
CELL_DOMAIN_NAME = os.environ.get('CELL_DOMAIN_NAME', '')
|
CELL_DOMAIN_NAME = os.environ.get('CELL_DOMAIN_NAME', '')
|
||||||
CLOUDFLARE_TOKEN = os.environ.get('CLOUDFLARE_API_TOKEN', '')
|
CLOUDFLARE_TOKEN = os.environ.get('CLOUDFLARE_API_TOKEN', '')
|
||||||
DUCKDNS_TOKEN = os.environ.get('DUCKDNS_TOKEN', '')
|
DUCKDNS_TOKEN = os.environ.get('DUCKDNS_TOKEN', '')
|
||||||
@@ -413,9 +413,6 @@ def main():
|
|||||||
ensure_session_secret()
|
ensure_session_secret()
|
||||||
bootstrap_admin_password()
|
bootstrap_admin_password()
|
||||||
|
|
||||||
if domain_mode == 'pic_ngo':
|
|
||||||
register_with_ddns(cell_name)
|
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print('--- Setup complete! Run: make start ---')
|
print('--- Setup complete! Run: make start ---')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user