6 if [ "$ACTION" = "ifup" ]; then
7 /etc/init.d/freeswitch enabled && {
8 local not_all_up="$(sh -c '
13 local network_ignore=""
19 config_get_bool up "$1" up 0
20 config_get proto "$1" proto
21 if [ "$proto" != "none" ] && [ "$up" -ne 1 ]; then
26 for ignore in $network_ignore; do
27 [ "$cfg" = "$ignore" ] && new_down=0
30 [ "$new_down" = "1" ] && if_is_down=1
37 config_get network "$1" network
38 append network_ignore "$network"
42 config_load freeswitch
43 config_foreach append_ignore network_ignore
45 config_foreach check_if_down interface
49 [ "$not_all_up" = "0" ] && {
52 mkdir -p /tmp/freeswitch
53 lock /tmp/freeswitch/.start.lck
54 config_load freeswitch
55 config_get started "state" started
56 [ "$started" != "1" ] && {
57 /etc/init.d/freeswitch start
58 uci_set_state freeswitch global state started 1
60 lock -u /tmp/freeswitch/.start.lck