ed9c44f0057fcf86fdf49f2ee8849605bf3b6752
[weathermon.git] / init.d / weather-display
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007-2014 OpenWrt.org
3
4 START=99
5
6 USE_PROCD=1
7
8 PROG=/usr/bin/weather-display
9 NICEPRIO=3
10
11 start_service() {
12
13         sleep 2
14         echo 1 > /sys/class/alphalcd/lcdi2c/clear
15         printf '\x00\x00' > /sys/class/alphalcd/lcdi2c/position
16
17         procd_open_instance
18         procd_set_param command "$PROG"
19         procd_set_param nice "$NICEPRIO"
20         procd_set_param respawn ${respawn_threshold:-600} ${respawn_timeout:-5} ${respawn_retry:-5}
21         procd_close_instance
22 }
23
24 reload_service()
25 {
26         stop
27         start
28 }