Archived
Build KarlDNS self-hosted DynDNS service
This commit is contained in:
1 parent
45bc38d950
commit
ca92dc211a
65 files changed
+9200
-3570
No files matched your search
@@ -17,6 +17,11 @@ def main() -> None:
|
||||
serve = subparsers.add_parser("serve", help="Run the DDNS HTTP service.")
|
||||
serve.add_argument("--host", default="0.0.0.0")
|
||||
serve.add_argument("--port", type=int, default=8080)
|
||||
serve.add_argument(
|
||||
"--access-log",
|
||||
action="store_true",
|
||||
help="Enable Uvicorn access logs. Disabled by default because update URLs are bearer secrets.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.command == "render-fritz-url":
|
||||
@@ -27,7 +32,7 @@ def main() -> None:
|
||||
settings = DdnsSettings.from_env()
|
||||
if not settings.admin_password:
|
||||
raise SystemExit("DDNS_ADMIN_PASSWORD must be set.")
|
||||
uvicorn.run(make_app(settings), host=args.host, port=args.port)
|
||||
uvicorn.run(make_app(settings), host=args.host, port=args.port, access_log=args.access_log)
|
||||
|
||||
|
||||
def _render_fritz_url(base_url: str, host: str, include_ipv6: bool) -> str:
|
||||
@@ -40,4 +45,3 @@ def _render_fritz_url(base_url: str, host: str, include_ipv6: bool) -> str:
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in new issue
Block a user