added systemctl setup

This commit is contained in:
jenz 2023-02-07 22:24:58 +01:00
parent 0a9c1f1394
commit c63aeb605c
2 changed files with 20 additions and 0 deletions

View File

@ -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

View File

@ -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