Browse Source

added systemd init files

Maxime Alves LIRMM@home 3 years ago
parent
commit
1b44794e15

+ 15
- 0
config/pyheatpump_api.service View File

@@ -0,0 +1,15 @@
1
+[Unit]
2
+Description=API to fetch data from heatpump with HTTP
3
+After=network.target
4
+
5
+[Service]
6
+Type=simple
7
+WorkingDirectory=/var/lib/pyheatpump/
8
+Environment="LOGLEVEL=INFO"
9
+ExecStart=/usr/bin/env pyheatpump run
10
+KillMode=mixed
11
+TimeoutStopSec=30
12
+PrivateTmp=true
13
+
14
+[Install]
15
+WantedBy=multi-user.target

+ 12
- 0
config/pyheatpump_fetch.service View File

@@ -0,0 +1,12 @@
1
+[Unit]
2
+Description=pyHeatpump fetch - retrieve the data from the serial port with modbus
3
+Requires=serial-getty@ttyUSB0
4
+
5
+[Service]
6
+Type=simple
7
+WorkingDirectory=/var/lib/pyheatpump/
8
+Environment="LOGLEVEL=INFO"
9
+ExecStart=/usr/bin/env pyheatpump fetch
10
+KillMode=mixed
11
+TimeoutStopSec=30
12
+PrivateTmp=true

+ 8
- 0
config/pyheatpump_fetch.timer View File

@@ -0,0 +1,8 @@
1
+[Unit]
2
+Description=Timer to launch pyheatpump fetch every minute
3
+
4
+[Timer]
5
+OnActiveSec=1m
6
+
7
+[Install]
8
+WantedBy=timers.target

+ 12
- 0
config/pyheatpump_supervise.service View File

@@ -0,0 +1,12 @@
1
+[Unit]
2
+Description=pyHeatpump supervise - communicates with the supervisor
3
+After=network.target
4
+
5
+[Service]
6
+Type=simple
7
+WorkingDirectory=/var/lib/pyheatpump/
8
+Environment="LOGLEVEL=INFO"
9
+ExecStart=/usr/bin/env pyheatpump supervise --since
10
+KillMode=mixed
11
+TimeoutStopSec=30
12
+PrivateTmp=true

+ 9
- 0
config/pyheatpump_supervise.timer View File

@@ -0,0 +1,9 @@
1
+[Unit]
2
+Description=Timer to launch pyheatpump supervise every minute, with an offset of 30 seconds
3
+
4
+[Timer]
5
+OnBooSec=90s
6
+OnActiveSec=1m
7
+
8
+[Install]
9
+WantedBy=timers.target

Loading…
Cancel
Save