horst: Update to version 5.1 and add init script
[feed/packages.git] / net / horst / horst.init
1 #!/bin/sh /etc/rc.common
2
3 START=94
4
5 USE_PROCD=1
6 PROG=/usr/sbin/horst
7
8 start_service() {
9 config_load horst
10 config_get dis "init" 'disabled' '0'
11 [ "$dis" == "0" ] || exit
12
13 config_get intf "init" 'interface' 'wlan0'
14 config_get scan "init" 'scan' '0'
15 [ "$scan" == "0" ] && scan='' || scan="-s"
16
17 procd_open_instance
18 procd_set_param command $PROG -q -i $intf $scan -N
19 procd_set_param netdev $intf
20 procd_set_param respawn
21 procd_close_instance
22 }