to make the bridge work we need to run an askfirst instance on the ttyS. additionally add the lua scripts needed to make REST work. this is really ugly code but it works. i already cleaned up to the original code, but there are still issues such as a new luci session being created for each request. Signed-off-by: John Crispin <blogic@openwrt.org>
22 lines
389 B
Bash
Executable file
22 lines
389 B
Bash
Executable file
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2013 OpenWrt.org
|
|
|
|
# start after and stop before networking
|
|
START=20
|
|
STOP=89
|
|
|
|
USE_PROCD=1
|
|
|
|
service_triggers()
|
|
{
|
|
procd_add_reload_trigger "yunbridge"
|
|
}
|
|
|
|
start_service()
|
|
{
|
|
[ "$(uci -q get yunbridge.config.disabled)" = "1" ] && return 0
|
|
procd_open_instance
|
|
procd_set_param command "/sbin/yunbridge"
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|