Last active
February 23, 2021 19:00
-
-
Save aperezm-vlex/75d7481afff0db8f5894 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 | |
fbset -depth 8 && fbset -depth 16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This one work for Raspberry Pi 4 4GB (mine):
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
fbset -depth 8 && fbset -depth 16