Skip to content

Commit 1c4da35

Browse files
meijjaadennissiemensma
authored andcommitted
add systemd service files (#414)
1 parent e67fded commit 1c4da35

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=DSMR Backend
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
User=dsmr
8+
Group=dsmr
9+
StandardOutput=null
10+
StandardError=journal
11+
Nice=10
12+
WorkingDirectory=/home/dsmr/dsmr-reader/
13+
PIDFile=/var/tmp/dsmrreader--dsmr_backend.pid
14+
ExecStart=/home/dsmr/.virtualenvs/dsmrreader/bin/python3 -u /home/dsmr/dsmr-reader/manage.py dsmr_backend
15+
Restart=always
16+
RestartSec=10
17+
18+
[Install]
19+
WantedBy=multi-user.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=DSMR Reader
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
User=dsmr
8+
Group=dsmr
9+
StandardOutput=null
10+
StandardError=journal
11+
Nice=5
12+
WorkingDirectory=/home/dsmr/dsmr-reader/
13+
PIDFile=/var/tmp/dsmrreader--dsmr_datalogger.pid
14+
ExecStart=/home/dsmr/.virtualenvs/dsmrreader/bin/python3 -u /home/dsmr/dsmr-reader/manage.py dsmr_datalogger
15+
Restart=always
16+
RestartSec=10
17+
18+
[Install]
19+
WantedBy=multi-user.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=DMSR Web Interface
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
User=dsmr
8+
Group=dsmr
9+
StandardOutput=null
10+
StandardError=journal
11+
Nice=15
12+
WorkingDirectory=/home/dsmr/dsmr-reader/
13+
PIDFile=/var/tmp/dsmrreader--dsmr_webinterface.pid
14+
ExecStart=/home/dsmr/.virtualenvs/dsmrreader/bin/gunicorn --timeout 60 --max-requests 500 --bind unix:/var/tmp/gunicorn--dsmr_webinterface.socket --pid /var/tmp/gunicorn--dsmr_webinterface.pid dsmrreader.wsgi
15+
Restart=always
16+
RestartSec=10
17+
18+
[Install]
19+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)