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.

40 lines
896 B
Bash

#!/bin/sh /etc/rc.common
#STUN 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_stund"
. /lib/delos-functions.sh
start_service() {
[ "$(uci_get_state delos baptization Tr069)" != "1" ] && ! dvl_is_internal_firmware && exit 1
local server=`uci -q get tr069_stun.stun.server_address`
[ "$server" = "" ] && exit 0
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
}
boot() {
start
}
reload_service() {
logger -p crit -t "tr069_stun" "reloading service()"
stop
start
}
service_triggers()
{
procd_add_reload_trigger tr069_stun
}