diff --git a/servarr/servarr-install-script.sh b/servarr/servarr-install-script.sh index dff44fd97..0b9730fe3 100644 --- a/servarr/servarr-install-script.sh +++ b/servarr/servarr-install-script.sh @@ -360,8 +360,15 @@ echo "" echo "Checking if the service is up and running..." # Loop to wait until the service is active +attempts=0 while ! systemctl is-active --quiet "$app"; do sleep 1 + attempts=$((attempts + 1)) + if [ "$attempts" -gt 15 ]; then + echo "" + echo -e "${brown}[${app^}]${reset} service failed to start within 15 seconds. Check 'journalctl -u $app -e' for details." + exit 1 + fi done echo "" diff --git a/sonarr/tips-and-tricks.md b/sonarr/tips-and-tricks.md index 22a4456d1..734e7d298 100644 --- a/sonarr/tips-and-tricks.md +++ b/sonarr/tips-and-tricks.md @@ -55,8 +55,8 @@ find . -maxdepth 1 -type f \( -iname "*.mkv" -o -iname "*.mp4" \) -exec sh -c 'm Alternatively in Windows you can run the following script in Powershell to iterate over each file in a directory, and move it to a folder with the same name. ```powershell -Get-ChildItem -File - | ForEach-Object { +Get-ChildItem -File | + ForEach-Object { $dir = New-Item -ItemType Directory -Name $_.BaseName -Force $_ | Move-Item -Destination $dir }