|
@ -3,6 +3,7 @@ |
|
|
START=85 |
|
|
START=85 |
|
|
USE_PROCD=1 |
|
|
USE_PROCD=1 |
|
|
|
|
|
|
|
|
|
|
|
trm_init="/etc/init.d/travelmate" |
|
|
trm_script="/usr/bin/travelmate.sh" |
|
|
trm_script="/usr/bin/travelmate.sh" |
|
|
|
|
|
|
|
|
boot() |
|
|
boot() |
|
@ -23,18 +24,18 @@ start_service() |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stop_service() |
|
|
|
|
|
{ |
|
|
|
|
|
killall -q -TERM "travelmate.sh" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
service_triggers() |
|
|
service_triggers() |
|
|
{ |
|
|
{ |
|
|
local iface="$(uci -q get travelmate.global.trm_iface)" |
|
|
local iface="$(uci -q get travelmate.global.trm_iface)" |
|
|
|
|
|
|
|
|
if [ -z "${iface}" ] |
|
|
|
|
|
then |
|
|
|
|
|
procd_add_raw_trigger "interface.*.down" 1000 /etc/init.d/travelmate start |
|
|
|
|
|
else |
|
|
|
|
|
for name in ${iface} |
|
|
|
|
|
do |
|
|
|
|
|
procd_add_interface_trigger "interface.*.down" "${name}" /etc/init.d/travelmate start |
|
|
|
|
|
done |
|
|
|
|
|
fi |
|
|
|
|
|
procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start |
|
|
|
|
|
|
|
|
for name in ${iface} |
|
|
|
|
|
do |
|
|
|
|
|
procd_add_interface_trigger "interface.*.down" "${name}" "${trm_init}" start |
|
|
|
|
|
done |
|
|
|
|
|
procd_add_config_trigger "config.change" "travelmate" "${trm_init}" start |
|
|
} |
|
|
} |