From 7218b93df03e623e7ecce7e8907dabdc7c6fc8a2 Mon Sep 17 00:00:00 2001 From: Anestis Georgiadis Date: Sun, 22 Sep 2019 10:47:58 +0300 Subject: [PATCH] Add support for ssl configuration --- default.toml | 4 +++- piholeinflux.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/default.toml b/default.toml index a3f2f5b..20aad9f 100644 --- a/default.toml +++ b/default.toml @@ -4,6 +4,8 @@ log_level = "info" influxdb_host = "127.0.0.1" influxdb_port = "8086" influxdb_database = "pihole" +influxdb_ssl = "False" +influxdb_verify_ssl = "True" request_timeout = 10 reporting_interval = 30 @@ -12,4 +14,4 @@ instances="localhost=http://127.0.0.1/admin/api.php" [development] -[production] \ No newline at end of file +[production] diff --git a/piholeinflux.py b/piholeinflux.py index 52abede..d9a9c0e 100755 --- a/piholeinflux.py +++ b/piholeinflux.py @@ -52,6 +52,8 @@ def __init__(self, single_run=False): username=settings.get("INFLUXDB_USERNAME"), password=settings.get("INFLUXDB_PASSWORD"), database=settings.INFLUXDB_DATABASE, + ssl=settings.as_bool("INFLUXDB_SSL"), + verify_ssl=settings.as_bool("INFLUXDB_VERIFY_SSL"), ) self.single_run = single_run