mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
use uci context
This commit is contained in:
parent
7e46afec1c
commit
8eb7d68e65
12 changed files with 183 additions and 320 deletions
|
|
@ -1,24 +1,24 @@
|
|||
config settings network
|
||||
config network
|
||||
option broadcast_ip '225.0.0.37'
|
||||
option broadcast_port '1025'
|
||||
option multicast '1'
|
||||
option shared_key 'Niiiiiiiiiiiiiik'
|
||||
option iv 'Niiiiiiiiiiiiiik'
|
||||
|
||||
config settings ordering
|
||||
config ordering
|
||||
option sort_order 'csfb'
|
||||
|
||||
config settings hostapd
|
||||
config hostapd
|
||||
option hostapd_dir '/var/run/hostapd'
|
||||
|
||||
config settings times
|
||||
config times
|
||||
option update_client '10'
|
||||
option remove_client '120'
|
||||
option remove_probe '120'
|
||||
option remove_ap '460'
|
||||
option update_hostapd '10'
|
||||
|
||||
config settings metric
|
||||
config metric
|
||||
option ht_support '10'
|
||||
option vht_support '100'
|
||||
option no_ht_support '0'
|
||||
|
|
|
|||
|
|
@ -11,51 +11,10 @@ NAME=dawn
|
|||
start_service()
|
||||
{
|
||||
echo "Starting Service..."
|
||||
|
||||
local broadcast_ip
|
||||
local broadcast_port
|
||||
local sort_order
|
||||
local hostapd_dir
|
||||
local shared_key
|
||||
local iv
|
||||
|
||||
config_load "${NAME}"
|
||||
config_get broadcast_ip network broadcast_ip
|
||||
config_get broadcast_port network broadcast_port
|
||||
config_get shared_key network shared_key
|
||||
config_get iv network iv
|
||||
|
||||
config_get sort_order ordering sort_order
|
||||
config_get hostapd_dir hostapd hostapd_dir
|
||||
|
||||
config_get multicast network multicast
|
||||
|
||||
procd_open_instance
|
||||
echo "$PROG -p $broadcast_port -i $broadcast_ip -o $sort_order"
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -p "${broadcast_port}"
|
||||
procd_append_param command -i "${broadcast_ip}"
|
||||
procd_append_param command -o "${sort_order}"
|
||||
procd_append_param command -h "${hostapd_dir}"
|
||||
procd_append_param command -k "${shared_key}"
|
||||
procd_append_param command -v "${iv}"
|
||||
|
||||
if [ "${multicast}" -gt 0 ]; then
|
||||
procd_append_param command -m
|
||||
fi
|
||||
|
||||
procd_set_param command $PROG
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
echo "${command}"
|
||||
|
||||
# procd_set_param respawn
|
||||
|
||||
echo "Starting mdns"
|
||||
procd_add_mdns "dawn" "udp" "${broadcast_port}" "daemon=dawn" "colour=fuschia"
|
||||
|
||||
echo "MDNS Startet"
|
||||
|
||||
procd_close_instance
|
||||
echo "Dawn instance started!"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue