summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-09-27 00:54:57 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-09-27 00:54:57 +0300
commitd3a295872c49defb55fc8e4e43e55550991e0927 (patch)
treeb9dca15454f9027d5a9dad0d4443a20de04dbc5d /systemd
parentb7cbc2571c1870b4582ead45277d0aa7f961bec8 (diff)
parentbdbb296697f55f4c3a07af43c9aaf7a9ea86f3d0 (diff)
Merge branch 'master' of ch1p.io:homekit
Diffstat (limited to 'systemd')
-rw-r--r--systemd/camera_node.service2
-rw-r--r--systemd/camera_node@.service2
-rw-r--r--systemd/esp32cam_capture_diff_node.service2
-rw-r--r--systemd/gpiorelayd@.service5
-rw-r--r--systemd/inverter_bot.service2
-rw-r--r--systemd/inverter_mqtt_receiver.service13
-rw-r--r--systemd/inverter_mqtt_sender.service2
-rw-r--r--systemd/ipcam_capture@.service15
-rw-r--r--systemd/ipcam_rtsp2hls@.service14
-rw-r--r--systemd/ipcam_server.service5
-rw-r--r--systemd/polaris_kettle_bot.service2
-rw-r--r--systemd/pump_bot.service2
-rw-r--r--systemd/pump_mqtt_bot.service2
-rw-r--r--systemd/relay_mqtt_bot.service2
-rw-r--r--systemd/relay_mqtt_http_proxy.service2
-rw-r--r--systemd/sensors_bot.service2
-rw-r--r--systemd/sensors_mqtt_receiver.service4
-rw-r--r--systemd/sensors_mqtt_sender.service13
-rw-r--r--systemd/sound_bot.service2
-rw-r--r--systemd/sound_node.service2
-rw-r--r--systemd/sound_sensor_node.service2
-rw-r--r--systemd/sound_sensor_server.service2
-rw-r--r--systemd/temphumd.service2
-rw-r--r--systemd/temphumd@.service2
24 files changed, 38 insertions, 65 deletions
diff --git a/systemd/camera_node.service b/systemd/camera_node.service
index 0de3cc1..83471bd 100644
--- a/systemd/camera_node.service
+++ b/systemd/camera_node.service
@@ -6,7 +6,7 @@ After=network-online.target
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/camera_node.py
+ExecStart=/home/user/homekit/bin/camera_node.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/camera_node@.service b/systemd/camera_node@.service
index 414881e..a272002 100644
--- a/systemd/camera_node@.service
+++ b/systemd/camera_node@.service
@@ -6,7 +6,7 @@ After=network-online.target
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/camera_node.py --config /home/user/.config/camera_node.%i.yaml
+ExecStart=/home/user/homekit/bin/camera_node.py --config /home/user/.config/camera_node.%i.yaml
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/esp32cam_capture_diff_node.service b/systemd/esp32cam_capture_diff_node.service
index ecc4861..a742edc 100644
--- a/systemd/esp32cam_capture_diff_node.service
+++ b/systemd/esp32cam_capture_diff_node.service
@@ -6,7 +6,7 @@ After=network-online.target
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/esp32cam_capture_diff_node.py
+ExecStart=/home/user/homekit/bin/esp32cam_capture_diff_node.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/gpiorelayd@.service b/systemd/gpiorelayd@.service
index 0cc0582..e3922dc 100644
--- a/systemd/gpiorelayd@.service
+++ b/systemd/gpiorelayd@.service
@@ -1,12 +1,13 @@
[Unit]
-Description=GPIO Relay Daemon
+Description=Homekit: GPIO Relay Daemon for H3 boards
After=network-online.target
[Service]
User=root
Group=root
Restart=on-failure
-ExecStart=/home/user/homekit/src/gpiorelayd.py -c /etc/gpiorelayd.conf.d/%i.toml
+EnvironmentFile=/etc/default/homekit_gpiorelayd_%i
+ExecStart=/home/user/homekit/bin/gpiorelayd.py --pin $PIN --listen $LISTEN
WorkingDirectory=/root
[Install]
diff --git a/systemd/inverter_bot.service b/systemd/inverter_bot.service
index 96612ae..c5d4aec 100644
--- a/systemd/inverter_bot.service
+++ b/systemd/inverter_bot.service
@@ -6,7 +6,7 @@ After=inverterd.service
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/inverter_bot.py
+ExecStart=/home/user/homekit/bin/inverter_bot.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/inverter_mqtt_receiver.service b/systemd/inverter_mqtt_receiver.service
new file mode 100644
index 0000000..88f9169
--- /dev/null
+++ b/systemd/inverter_mqtt_receiver.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Inverter MQTT receiver
+After=clickhouse-server.service
+
+[Service]
+User=user
+Group=user
+Restart=on-failure
+ExecStart=/home/user/homekit/bin/inverter_mqtt_util.py receiver
+WorkingDirectory=/home/user
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/inverter_mqtt_sender.service b/systemd/inverter_mqtt_sender.service
index e3925f6..bf6ab61 100644
--- a/systemd/inverter_mqtt_sender.service
+++ b/systemd/inverter_mqtt_sender.service
@@ -6,7 +6,7 @@ After=inverterd.service
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/inverter_mqtt_sender.py
+ExecStart=/home/user/homekit/bin/inverter_mqtt_util.py sender
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/ipcam_capture@.service b/systemd/ipcam_capture@.service
deleted file mode 100644
index b1c363e..0000000
--- a/systemd/ipcam_capture@.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=save ipcam streams
-After=network-online.target
-
-[Service]
-Restart=always
-RestartSec=3
-User=user
-Group=user
-EnvironmentFile=/etc/ipcam_capture.conf.d/%i.conf
-ExecStart=/home/user/homekit/tools/ipcam_capture.sh --outdir $OUTDIR --creds $CREDS --ip $IP --port $PORT $ARGS
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/systemd/ipcam_rtsp2hls@.service b/systemd/ipcam_rtsp2hls@.service
deleted file mode 100644
index addd819..0000000
--- a/systemd/ipcam_rtsp2hls@.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=convert rtsp to hls for viewing live camera feeds in browser
-After=network-online.target
-
-[Service]
-Restart=always
-RestartSec=3
-User=user
-Group=user
-EnvironmentFile=/etc/ipcam_rtsp2hls.conf.d/%i.conf
-ExecStart=/home/user/homekit/tools/ipcam_rtsp2hls.sh --name %i --user $USER --password $PASSWORD --ip $IP --port $PORT $ARGS
-
-[Install]
-WantedBy=multi-user.target
diff --git a/systemd/ipcam_server.service b/systemd/ipcam_server.service
index 07ac95f..53e588d 100644
--- a/systemd/ipcam_server.service
+++ b/systemd/ipcam_server.service
@@ -1,5 +1,5 @@
[Unit]
-Description=HomeKit IPCam Server
+Description=Homekit IPCam Server
After=network-online.target
[Service]
@@ -7,7 +7,8 @@ User=user
Group=user
Restart=always
RestartSec=10
-ExecStart=/home/user/homekit/src/ipcam_server.py
+EnvironmentFile=/etc/default/homekit_ipcam_server
+ExecStart=/home/user/homekit/bin/ipcam_server.py --listen "$LISTEN" --database-path "$DATABASE_PATH"
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/polaris_kettle_bot.service b/systemd/polaris_kettle_bot.service
index f91ed60..86bb293 100644
--- a/systemd/polaris_kettle_bot.service
+++ b/systemd/polaris_kettle_bot.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/polaris_kettle_bot.py
+ExecStart=/home/user/homekit/bin/polaris_kettle_bot.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/pump_bot.service b/systemd/pump_bot.service
index dd8a46b..b59f5b9 100644
--- a/systemd/pump_bot.service
+++ b/systemd/pump_bot.service
@@ -6,7 +6,7 @@ After=gpiorelayd.service
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/pump_bot.py
+ExecStart=/home/user/homekit/bin/pump_bot.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/pump_mqtt_bot.service b/systemd/pump_mqtt_bot.service
index 95f9419..6c72cbf 100644
--- a/systemd/pump_mqtt_bot.service
+++ b/systemd/pump_mqtt_bot.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/pump_mqtt_bot.py
+ExecStart=/home/user/homekit/bin/pump_mqtt_bot.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/relay_mqtt_bot.service b/systemd/relay_mqtt_bot.service
index 93696ac..3bac158 100644
--- a/systemd/relay_mqtt_bot.service
+++ b/systemd/relay_mqtt_bot.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/relay_mqtt_bot.py
+ExecStart=/home/user/homekit/bin/relay_mqtt_bot.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/relay_mqtt_http_proxy.service b/systemd/relay_mqtt_http_proxy.service
index 316a920..8301d52 100644
--- a/systemd/relay_mqtt_http_proxy.service
+++ b/systemd/relay_mqtt_http_proxy.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/relay_mqtt_http_proxy.py
+ExecStart=/home/user/homekit/bin/relay_mqtt_http_proxy.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/sensors_bot.service b/systemd/sensors_bot.service
index 50128b3..2470d92 100644
--- a/systemd/sensors_bot.service
+++ b/systemd/sensors_bot.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/sensors_bot.py
+ExecStart=/home/user/homekit/bin/sensors_bot.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/sensors_mqtt_receiver.service b/systemd/sensors_mqtt_receiver.service
index e67c112..5b9ff6a 100644
--- a/systemd/sensors_mqtt_receiver.service
+++ b/systemd/sensors_mqtt_receiver.service
@@ -1,12 +1,12 @@
[Unit]
-Description=sensors mqtt receiver
+Description=temphum mqtt receiver
After=network.target
[Service]
User=user
Group=user
Restart=on-failure
-ExecStart=python3 /home/user/home/src/sensors_mqtt_receiver.py
+ExecStart=python3 /home/user/home/src/temphum_mqtt_receiver.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/sensors_mqtt_sender.service b/systemd/sensors_mqtt_sender.service
deleted file mode 100644
index a271d72..0000000
--- a/systemd/sensors_mqtt_sender.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Sensors MQTT sender
-After=temphumd.service
-
-[Service]
-User=user
-Group=user
-Restart=on-failure
-ExecStart=/home/user/homekit/src/sensors_mqtt_sender.py
-WorkingDirectory=/home/user
-
-[Install]
-WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/sound_bot.service b/systemd/sound_bot.service
index 51a9e0f..e0b5500 100644
--- a/systemd/sound_bot.service
+++ b/systemd/sound_bot.service
@@ -6,7 +6,7 @@ After=network-online.target
Restart=on-failure
User=user
WorkingDirectory=/home/user
-ExecStart=/home/user/homekit/src/sound_bot.py
+ExecStart=/home/user/homekit/bin/sound_bot.py
[Install]
WantedBy=multi-user.target \ No newline at end of file
diff --git a/systemd/sound_node.service b/systemd/sound_node.service
index e3e3afd..a14ec1f 100644
--- a/systemd/sound_node.service
+++ b/systemd/sound_node.service
@@ -6,7 +6,7 @@ After=network-online.target
User=root
Group=root
Restart=on-failure
-ExecStart=/home/user/homekit/src/sound_node.py --config /etc/sound_node.toml
+ExecStart=/home/user/homekit/bin/sound_node.py --config /etc/sound_node.toml
WorkingDirectory=/root
[Install]
diff --git a/systemd/sound_sensor_node.service b/systemd/sound_sensor_node.service
index d10f976..dfc2ecd 100644
--- a/systemd/sound_sensor_node.service
+++ b/systemd/sound_sensor_node.service
@@ -6,7 +6,7 @@ After=network-online.target
User=root
Group=root
Restart=on-failure
-ExecStart=/home/user/homekit/src/sound_sensor_node.py --config /etc/sound_sensor_node.toml
+ExecStart=/home/user/homekit/bin/sound_sensor_node.py --config /etc/sound_sensor_node.toml
WorkingDirectory=/root
[Install]
diff --git a/systemd/sound_sensor_server.service b/systemd/sound_sensor_server.service
index 0133e53..5ab08cd 100644
--- a/systemd/sound_sensor_server.service
+++ b/systemd/sound_sensor_server.service
@@ -6,7 +6,7 @@ After=network-online.target
User=user
Group=user
Restart=on-failure
-ExecStart=/home/user/homekit/src/sound_sensor_server.py
+ExecStart=/home/user/homekit/bin/sound_sensor_server.py
WorkingDirectory=/home/user
[Install]
diff --git a/systemd/temphumd.service b/systemd/temphumd.service
index 1da9617..dd5ec55 100644
--- a/systemd/temphumd.service
+++ b/systemd/temphumd.service
@@ -4,7 +4,7 @@ After=network-online.target
[Service]
Restart=on-failure
-ExecStart=/home/user/homekit/src/temphumd.py --config /etc/temphumd.toml
+ExecStart=/home/user/homekit/bin/temphumd.py --config /etc/temphumd.toml
[Install]
WantedBy=multi-user.target
diff --git a/systemd/temphumd@.service b/systemd/temphumd@.service
index d1c840d..7b1b11e 100644
--- a/systemd/temphumd@.service
+++ b/systemd/temphumd@.service
@@ -4,7 +4,7 @@ After=network-online.target
[Service]
Restart=on-failure
-ExecStart=/home/user/homekit/src/temphumd.py --config /etc/temphumd-%i.toml
+ExecStart=/home/user/homekit/bin/temphumd.py --config /etc/temphumd-%i.toml
[Install]
WantedBy=multi-user.target