Automatically restart koreader if it exits or crashes
This commit is contained in:
parent
975109de80
commit
ca474d399d
8
build.sh
8
build.sh
@ -125,6 +125,14 @@ compile_koreader() {
|
|||||||
mkdir opt
|
mkdir opt
|
||||||
cd opt
|
cd opt
|
||||||
tar xf ../../koreader/koreader-kobo-arm-linux-gnueabihf*.targz
|
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 ../../
|
cd ../../
|
||||||
dpkg-deb -b koreader-pkg .
|
dpkg-deb -b koreader-pkg .
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Package: koreader
|
Package: koreader
|
||||||
Version: 2016.01-1
|
Version: 2016.01-2
|
||||||
Maintainer: Cosmin Gorgovan <okreader@linux-geek.org>
|
Maintainer: Cosmin Gorgovan <okreader@linux-geek.org>
|
||||||
Architecture: armhf
|
Architecture: armhf
|
||||||
Description: An ebook viewer application.
|
Description: An ebook viewer application.
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
|
||||||
do_start () {
|
do_start () {
|
||||||
cd /opt/koreader
|
/opt/koreader/okreader.sh &
|
||||||
./luajit ./reader.lua /mnt/onboard &
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
Loading…
Reference in New Issue
Block a user