From 9c9a1b0a08966a3bf7e588ac82a6053647266099 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 28 Jul 2022 11:46:02 +0000 Subject: [PATCH] Rename and change download.sh to audio.sh, rename log file --- root/scripts/{start.sh => start_audio.sh} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename root/scripts/{start.sh => start_audio.sh} (68%) diff --git a/root/scripts/start.sh b/root/scripts/start_audio.sh similarity index 68% rename from root/scripts/start.sh rename to root/scripts/start_audio.sh index 747453d..0246f82 100644 --- a/root/scripts/start.sh +++ b/root/scripts/start_audio.sh @@ -1,7 +1,7 @@ -#!/usr/bin/with-contenv bash +#!/usr/bin/env bash echo "Starting Script...." -processstartid="$(ps -A -o pid,cmd|grep "/config/extended/scripts/start.sh" | grep -v grep | head -n 1 | awk '{print $1}')" +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 @@ -15,13 +15,13 @@ for (( ; ; )); do 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_script_run_*.txt" -not -newer "/config/extended/logs/log-cleanup" | read; then + 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/download.sh 2>&1 | tee "/config/logs/extended_script_run_${i}_$(date +"%Y_%m_%d_%I_%M_%p").txt" > /proc/1/fd/1 2>/proc/1/fd/2 + 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