From e015fb7696316e71e45144278be5caa8980cc201 Mon Sep 17 00:00:00 2001 From: mrhanky Date: Tue, 22 Aug 2017 21:45:26 +0200 Subject: [PATCH] Updated backup timer and added some vars to bot unit --- files/nxy-bot.service | 4 +++- files/nxy-db-dump.timer | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/files/nxy-bot.service b/files/nxy-bot.service index 99d18ab..f5721a2 100644 --- a/files/nxy-bot.service +++ b/files/nxy-bot.service @@ -6,8 +6,10 @@ After=network.target Type=simple Restart=always Environment=PYTHONPATH=%h/nxy +Environment=CFG_FILE=config.json +Environment=ENV_FILE=.env WorkingDirectory=/home/nxy -ExecStart=/home/nxy/env/bin/python -m bot config.json +ExecStart=/home/nxy/env/bin/python -m bot $CFG_FILE $ENV_FILE [Install] WantedBy=default.target diff --git a/files/nxy-db-dump.timer b/files/nxy-db-dump.timer index 4f3ffd8..9e2ad54 100644 --- a/files/nxy-db-dump.timer +++ b/files/nxy-db-dump.timer @@ -1,8 +1,9 @@ [Unit] Description=nxy database dump timer +After=postgresql.service [Timer] -OnBootSec=10min +OnBootSec=50min OnUnitActiveSec=12h [Install]