You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB
Bash

#!/bin/sh /etc/rc.common
#UPNP client software
#Copyright (C) 2016 PIVA SOFTWARE <www.pivasoftware.com> - All Rights Reserved
#Author: MOHAMED Kallel <mohamed.kallel@pivasoftware.com>
#Author: ANIS Ellouze <anis.ellouze@pivasoftware.com>
#This software is under the terms of the commercial license attached with this source code
START=90
USE_PROCD=1
PROG="/usr/sbin/tr069_upnpd"
. /lib/delos-functions.sh
start_service() {
[ "$(uci_get_state delos baptization Tr069)" != "1" ] && ! dvl_is_internal_firmware && exit 1
local enable=`uci -q get tr069_upnp.upnp.enable`
if [ "$enable" == "1" ]; then
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
fi
}
boot() {
start
}
reload_service() {
logger -p crit -t "tr069_upnp" "reloading service()"
#TODO ubus command to reload tr069_upnp
stop
start
}
service_triggers() {
local interface=`uci -q get easycwmp.@local[0].interface`
procd_add_reload_trigger tr069_upnp easycwmp
if [ "$interface" != "" ]; then
procd_add_reload_interface_trigger $interface
fi
}