Rename and change download.sh to audio.sh, rename log file

pull/35/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 58e56a14da
commit 9c9a1b0a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
Loading…
Cancel
Save