From 026427682be0539e923387dcecd6c816eb945e17 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 4 Nov 2022 11:18:49 -0400 Subject: [PATCH] Remove legacy script --- root/scripts/start_audio.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 root/scripts/start_audio.sh diff --git a/root/scripts/start_audio.sh b/root/scripts/start_audio.sh deleted file mode 100644 index b3c78fc..0000000 --- a/root/scripts/start_audio.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -if [ $enableAudioScript != true ]; then - echo "Extended Audio script disabled, enable by setting parameter: enableAudioScript=true" - exit -fi - -echo "Starting Script...." -processstartid="$(ps -A -o pid,cmd|grep "/config/extended/scripts/start_audio.sh" | grep -v grep | head -n 1 | awk '{print $1}')" -echo "To kill script, use the following command:" -echo "kill -9 $processstartid" -for (( ; ; )); do - let i++ - if [ ! -d "/config/logs" ]; then - mkdir -p "/config/logs" - chmod 777 "/config/logs" - chown abc:abc "/config/logs" - fi - if [ -f "/config/extended/logs/log-cleanup" ]; then - rm "/config/extended/logs/log-cleanup" - fi - touch -d "24 hours ago" "/config/extended/logs/log-cleanup" - if find "/config/logs" -type f -iname "extended_audio_script_run_*.txt" -not -newer "/config/extended/logs/log-cleanup" | read; then - find "/config/logs" -type f -iname "*.txt" -not -newer "/config/extended/logs/log-cleanup" -delete - fi - if [ -f "/config/extended/logs/log-cleanup" ]; then - rm "/config/extended/logs/log-cleanup" - fi - bash /config/extended/scripts/audio.sh 2>&1 | tee "/config/logs/extended_audio_script_run_${i}_$(date +"%Y_%m_%d_%I_%M_%p").txt" > /proc/1/fd/1 2>/proc/1/fd/2 - if [ -z "$scriptInterval" ]; then - scriptInterval="15m" - fi - echo "Script sleeping for $scriptInterval..." - sleep $scriptInterval -done - -exit 0