From 06140da5bbc405bdd95d6cfe33e64d7a79968ff9 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 26 Jan 2021 15:26:38 -0600 Subject: [PATCH] Rewrite jibri folder name by default using room name + date combination --- add-jibri-node.sh | 5 +++++ quick_jibri_installer.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/add-jibri-node.sh b/add-jibri-node.sh index 70701c6..3b7a2d1 100644 --- a/add-jibri-node.sh +++ b/add-jibri-node.sh @@ -298,6 +298,11 @@ echo "or storage provider, etc.) in this script" >> /tmp/finalize.out chmod -R 770 \$RECORDINGS_DIR +LJF_PATH="\$(find \$RECORDINGS_DIR -exec stat --printf="%Y\t%n\n" {} \; | sort -n -r|awk '{print\$2}'| grep -v "meta\|-" | head -n1)" +NJF_NAME="\$(find \$LJF_PATH |grep -e "-"|sed "s|\$LJF_PATH/||"|cut -d "." -f1)" +NJF_PATH="\$RECORDINGS_DIR/\$NJF_NAME" +mv \$LJF_PATH \$NJF_PATH + exit 0 REC_DIR chown jibri:jibri $REC_DIR diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index bda9737..16fabda 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -799,6 +799,11 @@ echo "or storage provider, etc.) in this script" >> /tmp/finalize.out chmod -R 770 \$RECORDINGS_DIR +LJF_PATH="\$(find \$RECORDINGS_DIR -exec stat --printf="%Y\t%n\n" {} \; | sort -n -r|awk '{print\$2}'| grep -v "meta\|-" | head -n1)" +NJF_NAME="\$(find \$LJF_PATH |grep -e "-"|sed "s|\$LJF_PATH/||"|cut -d "." -f1)" +NJF_PATH="\$RECORDINGS_DIR/\$NJF_NAME" +mv \$LJF_PATH \$NJF_PATH + exit 0 REC_DIR chown jibri:jibri $REC_DIR