obuspa: 6.0.0.10

This commit is contained in:
vdutta 2022-11-24 19:45:00 +05:30
parent ec6533707f
commit 1ba2d5ab89
2 changed files with 16 additions and 5 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=6.0.0.9
PKG_VERSION:=6.0.0.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -81,6 +81,14 @@ db_set()
fi
}
update_db_dump()
{
if [ -f "${DB_DUMP}" ]; then
rm ${DB_DUMP}
${PROG} -f ${SQL_DB_FILE} -c show database |sort > ${DB_DUMP}
fi
}
# if db present then check if it matches with existing instances
# fallback to max instance present + 1
# In case of no db get the count
@ -352,6 +360,7 @@ configure_localagent()
}
db_set Device.LocalAgent.EndpointID "${EndpointID}"
update_db_dump
}
update_reset_reason()
@ -447,6 +456,7 @@ configure_controller()
done
db_set
update_db_dump
}
configure_subscription()
@ -580,7 +590,6 @@ configure_mtp() {
log "Validation of mtp section failed"
return 1;
}
sec="${sec/mtp_/cpe-}"
get_base_path "Device.LocalAgent.MTP." "${sec}"
if [ -z "${BASEPATH}" ]; then
@ -624,6 +633,7 @@ configure_mtp() {
db_set "${BASEPATH}.WebSocket.EnableEncryption" "${EnableEncryption}"
fi
db_set
update_db_dump
}
configure_stomp_connection() {
@ -655,9 +665,10 @@ configure_stomp_connection() {
db_set "${BASEPATH}.EnableHeartbeats" "${EnableHeartbeats}"
db_set "${BASEPATH}.VirtualHost" "${VirtualHost}"
db_set
update_db_dump
}
configure_mqtt_client(){
configure_mqtt_client() {
local BrokerAddress BrokerPort Enable Username Password ProtocolVersion
local TransportProtocol ClientID
local sec
@ -686,6 +697,7 @@ configure_mqtt_client(){
db_set "${BASEPATH}.ClientID" "${ClientID}"
db_set
update_db_dump
}
@ -955,7 +967,6 @@ delete_sql_db_entry_with_pattern()
fi
if [ "${#pattern}" -lt 7 ]; then
log "Invalid pattern ${1}"
return 0;
fi
@ -970,7 +981,7 @@ check_n_delete_db()
local sec t r path
sec="${1}"
if uci -q get obuspa.${sec}; then
if uci -q get obuspa.${sec} >/dev/null 2>&1; then
return 0
fi