From c63aeb605cc79bf1a6ca2b7968aba86203bddad4 Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 7 Feb 2023 22:24:58 +0100 Subject: [PATCH] added systemctl setup --- jenz_ban_detector/systemctl/receive.service | 12 ++++++++++++ jenz_ban_detector/systemctl/receive.timer | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 jenz_ban_detector/systemctl/receive.service create mode 100644 jenz_ban_detector/systemctl/receive.timer diff --git a/jenz_ban_detector/systemctl/receive.service b/jenz_ban_detector/systemctl/receive.service new file mode 100644 index 00000000..a2ddb6ce --- /dev/null +++ b/jenz_ban_detector/systemctl/receive.service @@ -0,0 +1,12 @@ +[Unit] +Description=flask app that receives info + +[Service] +Type=simple +User=nonroot +Environment=PYTHONUNBUFFERED=1 +Environment=PATH=/home/nonroot/receive_motd_requests/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +WorkingDirectory=/home/nonroot/receive_motd_requests +ExecStart=/home/nonroot/receive_motd_requests/app.py +Restart=always +RuntimeMaxSec=6d diff --git a/jenz_ban_detector/systemctl/receive.timer b/jenz_ban_detector/systemctl/receive.timer new file mode 100644 index 00000000..3dadac20 --- /dev/null +++ b/jenz_ban_detector/systemctl/receive.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Flask app for receiving info + +[Timer] +OnCalendar=*-*-1,3,7,11,15,19,23,27,31 00:00:00 + +[Install] +WantedBy=multi-user.target