From e505c574643694cb567afe3acba76e6168e905bf Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Mon, 22 Jan 2024 03:15:24 +0300 Subject: rtsp2hls rkmpp tools upd --- systemd/ipcam_rtsp2hls_rkmpp@.service | 2 +- tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh | 5 + tools/ipcam_rtsp2hls_h264.sh | 126 ------------------------- tools/ipcam_rtsp2hls_rkmpp.sh | 126 +++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 127 deletions(-) create mode 100644 tools/ipcam_restart_rtsp2hls_rkmpp_3hr_cron.sh delete mode 100755 tools/ipcam_rtsp2hls_h264.sh create mode 100755 tools/ipcam_rtsp2hls_rkmpp.sh 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_h264.sh deleted file mode 100755 index 244a6d9..0000000 --- a/tools/ipcam_rtsp2hls_h264.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -PROGNAME="$0" -OUTDIR=/var/ipcamfs # should be tmpfs -PORT=554 -NAME= -IP= -USER= -PASSWORD= -DEBUG=0 -CHANNEL=1 -FORCE_UDP=0 -FORCE_TCP=0 -CUSTOM_PATH= - -die() { - echo >&2 "error: $@" - exit 1 -} - -usage() { - cat <&2 "error: $@" + exit 1 +} + +usage() { + cat <