diff --git a/functions.tf b/functions.tf index d38d851ecb8ab9d365fa14a0ac6d8b85500588f7..cf3bbdb2201c676462598fb02905f664d782e320 100644 --- a/functions.tf +++ b/functions.tf @@ -11,6 +11,7 @@ locals { "www", "myip", "kodi", + "transmission", ] function_names = [for name in local.functions : "${local.function_name_prefix}-${replace(name, "_", "")}"] } diff --git a/src/transmission.py b/src/transmission.py new file mode 100644 index 0000000000000000000000000000000000000000..b4b910fa242707a678a7def1b9eb999d8f336141 --- /dev/null +++ b/src/transmission.py @@ -0,0 +1,14 @@ +from utils import check_urls + + +def handler(event, context): # pylint: disable=unused-argument + """Lambda event handler.""" + checks = [ + {"url": "http://transmission.shore.co.il/", "codes": [301, 302]}, + {"url": "https://transmission.shore.co.il/", "codes": [401]}, + ] + check_urls(checks) + + +if __name__ == "__main__": + handler("event", "context")