-
-
Save SysadminJeroen/37044bc9645228aa75e552ef1dbe4199 to your computer and use it in GitHub Desktop.
Raspbian: Avoid black screen on kodi exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG_FILE=$HOME/.kodi/temp/kodi.log | |
rm $LOG_FILE 2> /dev/null | |
/usr/lib/kodi/kodi.bin --standalone & | |
while [[ ! -f $LOG_FILE ]] ; do | |
sleep 1s | |
done | |
while read line ; do | |
if [[ ${line} =~ "application stopped" ]] ; then | |
echo "Killing kodi" | |
break | |
fi | |
done < <(tail --pid=$$ -f -n0 $LOG_FILE) | |
killall kodi.bin | |
sleep 5 | |
fbset -depth 8 && fbset -depth 16 | |
sleep 1s | |
xrefresh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment