From e505c574643694cb567afe3acba76e6168e905bf Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Mon, 22 Jan 2024 03:15:24 +0300 Subject: [PATCH] rtsp2hls rkmpp tools upd --- systemd/ipcam_rtsp2hls_rkmpp@.service | 2 +- tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh | 5 +++++ tools/{ipcam_rtsp2hls_h264.sh => ipcam_rtsp2hls_rkmpp.sh} | 0 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh rename tools/{ipcam_rtsp2hls_h264.sh => ipcam_rtsp2hls_rkmpp.sh} (100%) 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 similarity index 100% rename from tools/ipcam_rtsp2hls_h264.sh rename to tools/ipcam_rtsp2hls_rkmpp.sh