Fix Kobo startup script w/ KSM

pkill probably only checks the actual name of the binary.
We were checking a shell script, which I'm guessing is not launched
via a shebang, so that name was actually an arg to sh, or something like
that.

Use pidof instead, which matches the full command line.
This commit is contained in:
NiLuJe
2015-04-27 22:37:54 +02:00
parent 1b24e2ae7d
commit 9f89fc8e47

View File

@@ -89,7 +89,7 @@ else
# if we were called from advboot then we must reboot to go to the menu
# NOTE: This is actually achieved by checking if KSM is running:
# This might lead to false-positives if you use neither KSM nor advboot to launch KOReader *without nickel running*.
if ! pkill -0 ksmhome.sh ; then
if ! pidof ksmhome.sh > /dev/null 2>&1 ; then
reboot
fi
fi