X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/7edb3771717d15f7c36d8459fa12b3d6f76d7d9a..e32107a7fe79ce34f3bdf860410a6d5455efdca7:/init.d/weather-display?ds=sidebyside diff --git a/init.d/weather-display b/init.d/weather-display new file mode 100755 index 0000000..ed9c44f --- /dev/null +++ b/init.d/weather-display @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2007-2014 OpenWrt.org + +START=99 + +USE_PROCD=1 + +PROG=/usr/bin/weather-display +NICEPRIO=3 + +start_service() { + + sleep 2 + echo 1 > /sys/class/alphalcd/lcdi2c/clear + printf '\x00\x00' > /sys/class/alphalcd/lcdi2c/position + + procd_open_instance + procd_set_param command "$PROG" + procd_set_param nice "$NICEPRIO" + procd_set_param respawn ${respawn_threshold:-600} ${respawn_timeout:-5} ${respawn_retry:-5} + procd_close_instance +} + +reload_service() +{ + stop + start +}