Automatically restart koreader if it exits or crashes

This commit is contained in:
Cosmin Gorgovan 2016-01-02 23:29:49 +00:00
parent 975109de80
commit ca474d399d
3 changed files with 10 additions and 3 deletions

View File

@ -125,6 +125,14 @@ compile_koreader() {
mkdir opt
cd opt
tar xf ../../koreader/koreader-kobo-arm-linux-gnueabihf*.targz
echo "#!/bin/bash" > koreader/okreader.sh
echo "cd /opt/koreader" >> koreader/okreader.sh
echo "while true; do" >> koreader/okreader.sh
echo " ./luajit ./reader.lua /mnt/onboard" >> koreader/okreader.sh
echo "done" >> koreader/okreader.sh
chmod +x koreader/okreader.sh
cd ../../
dpkg-deb -b koreader-pkg .
}

View File

@ -1,5 +1,5 @@
Package: koreader
Version: 2016.01-1
Version: 2016.01-2
Maintainer: Cosmin Gorgovan <okreader@linux-geek.org>
Architecture: armhf
Description: An ebook viewer application.

View File

@ -13,8 +13,7 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
do_start () {
cd /opt/koreader
./luajit ./reader.lua /mnt/onboard &
/opt/koreader/okreader.sh &
}
case "$1" in