diff --git a/raspotify/lib/systemd/system/raspotify.service b/raspotify/lib/systemd/system/raspotify.service index 79ce45d..742a936 100644 --- a/raspotify/lib/systemd/system/raspotify.service +++ b/raspotify/lib/systemd/system/raspotify.service @@ -80,6 +80,10 @@ Environment=TMPDIR=%t/%N EnvironmentFile=-%E/%N/conf +# Delay start up to debounce restarts +# and to help prevent librespot from +# starting to soon during boot up. +ExecStartPre=/usr/bin/sleep 10 ExecStart=/usr/bin/librespot [Install] diff --git a/raspotify/usr/bin/raspotify-crash-report-generator.sh b/raspotify/usr/bin/raspotify-crash-report-generator.sh index cb1c8d0..f022be1 100755 --- a/raspotify/usr/bin/raspotify-crash-report-generator.sh +++ b/raspotify/usr/bin/raspotify-crash-report-generator.sh @@ -42,7 +42,5 @@ done <$config systemctl reset-failed raspotify if [ "$fail_count" -lt 6 ]; then - # delay restarts by 10 sec to debounce - sleep 10 systemctl restart raspotify fi