summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--systemd/ipcam_rtsp2hls_rkmpp@.service2
-rw-r--r--tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh5
-rwxr-xr-xtools/ipcam_rtsp2hls_rkmpp.sh (renamed from tools/ipcam_rtsp2hls_h264.sh)0
3 files changed, 6 insertions, 1 deletions
diff --git a/systemd/ipcam_rtsp2hls_rkmpp@.service b/systemd/ipcam_rtsp2hls_rkmpp@.service
index 625d70c..f705233 100644
--- a/systemd/ipcam_rtsp2hls_rkmpp@.service
+++ b/systemd/ipcam_rtsp2hls_rkmpp@.service
@@ -8,7 +8,7 @@ RestartSec=3
User=root
Group=root
EnvironmentFile=/etc/ipcam_rtsp2hls.conf.d/%i.conf
-ExecStart=/home/user/homekit/tools/ipcam_rtsp2hls_h264.sh --name %i --user $USER --password $PASSWORD --ip $IP --port $PORT --force-tcp $ARGS
+ExecStart=/home/user/homekit/tools/ipcam_rtsp2hls_rkmpp.sh --name %i --user $USER --password $PASSWORD --ip $IP --port $PORT --force-tcp $ARGS
[Install]
WantedBy=multi-user.target
diff --git a/tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh b/tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh
new file mode 100644
index 0000000..6f2f4f3
--- /dev/null
+++ b/tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+for service in $(systemctl list-units --type service | grep ipcam_rtsp2hls_rkmpp | awk '{print $1}' | grep -v \.slice\$); do
+ systemctl restart $service
+done
diff --git a/tools/ipcam_rtsp2hls_h264.sh b/tools/ipcam_rtsp2hls_rkmpp.sh
index 244a6d9..244a6d9 100755
--- a/tools/ipcam_rtsp2hls_h264.sh
+++ b/tools/ipcam_rtsp2hls_rkmpp.sh