diff --git a/root/scripts/start.sh b/root/scripts/start.sh index 721ac03..aee3b3d 100644 --- a/root/scripts/start.sh +++ b/root/scripts/start.sh @@ -12,15 +12,15 @@ for (( ; ; )); do chown abc:abc "/config/logs" 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 - if [ -f "/config/logs/log-cleanup" ]; then - rm "/config/logs/log-cleanup" + if [ -f "/config/extended/logs/log-cleanup" ]; then + rm "/config/extended/logs/log-cleanup" fi - touch -d "8 hours ago" "/config/logs/log-cleanup" - if find "/config/logs" -type f -iname "extended_script_run_*.txt" -not -newer "/config/logs/log-cleanup" | read; then - find "/config/logs" -type f -iname "*.log" -not -newer "/config/logs/log-cleanup" -delete + touch -d "8 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 + find "/config/logs" -type f -iname "*.txt" -not -newer "/config/logs/log-cleanup" -delete fi - if [ -f "/config/logs/log-cleanup" ]; then - rm "/config/logs/log-cleanup" + if [ -f "/config/extended/logs/log-cleanup" ]; then + rm "/config/extended/logs/log-cleanup" fi if [ -z "$scriptInterval" ]; then scriptInterval="15m"