diff --git a/src/dash.sh b/src/dash.sh index a1eaa09..aaa0864 100755 --- a/src/dash.sh +++ b/src/dash.sh @@ -27,7 +27,11 @@ init() { echo "Starting dashboard with $REFRESH_SCHEDULE refresh..." - /etc/init.d/framework stop + if [ -f /etc/init.d/framework ]; then + /etc/init.d/framework stop + else + /etc/init/framework stop + fi initctl stop webreader >/dev/null 2>&1 echo powersave >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor lipc-set-prop com.lab126.powerd preventScreenSaver 1 diff --git a/src/local/fetch-dashboard.sh b/src/local/fetch-dashboard.sh index 0733233..494ddf3 100755 --- a/src/local/fetch-dashboard.sh +++ b/src/local/fetch-dashboard.sh @@ -1,4 +1,12 @@ #!/usr/bin/env sh + +# Url of content to download +CONTENT="https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png" + # Fetch a new dashboard image, make sure to output it to "$1". # For example: -"$(dirname "$0")/../xh" -d -q -o "$1" get https://raw.githubusercontent.com/pascalw/kindle-dash/master/example/example.png +"$(dirname "$0")/../xh" -d -q -o "$1" get $CONTENT +# xh seems not to be able to load certificates on Kindle PW Touch: fall back to curl in case of error +if [ $? != 0 ]; then + curl -o "$1" "$CONTENT" +fi \ No newline at end of file