aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-06-15 17:10:43 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-06-15 17:10:43 +0200
commit34a4a113854550e258b8fd8be914505507a9c3c7 (patch)
tree5c1014c617ff6ed5d8809713c14d8bec74d59ab0 /src
parentf44dc8feb115c531636b8796af27a3f9a6909ca5 (diff)
download0tdns-34a4a113854550e258b8fd8be914505507a9c3c7.tar.gz
0tdns-34a4a113854550e258b8fd8be914505507a9c3c7.zip
append to last log instead of overwriting it
Diffstat (limited to 'src')
-rwxr-xr-xsrc/hourly.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hourly.py b/src/hourly.py
index 1fd223d..4c44141 100755
--- a/src/hourly.py
+++ b/src/hourly.py
@@ -39,7 +39,7 @@ def get_vpn_connections(cursor, hour):
''')
return cursor.fetchall()
-with open("/var/log/0tdns.log", "w") as logfile:
+with open("/var/log/0tdns.log", "a") as logfile:
# round down to an hour - this datetime format is one
# of the formats accepted by postgres
hour = strftime('%Y-%m-%d %H:00', gmtime())