summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2018-01-04 14:48:39 -0600
committerJason Reiss <jreiss@multitech.com>2018-01-04 14:48:39 -0600
commit891540676720f4af95dec79a75884af914700909 (patch)
tree58b79af1a810052045846cae291079125b12fb6f
parenta8e11461b9adfe9394667d6c34be8b4da902397a (diff)
downloadmeta-mlinux-891540676720f4af95dec79a75884af914700909.tar.gz
meta-mlinux-891540676720f4af95dec79a75884af914700909.tar.bz2
meta-mlinux-891540676720f4af95dec79a75884af914700909.zip
lora: update network server to 2.0.13
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init21
-rw-r--r--recipes-connectivity/lora/lora-network-server-mtcap_2.0.13.bb (renamed from recipes-connectivity/lora/lora-network-server-mtcap_1.0.16.bb)8
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init3
-rw-r--r--recipes-connectivity/lora/lora-network-server_2.0.13.bb (renamed from recipes-connectivity/lora/lora-network-server_2.0.9.bb)4
4 files changed, 26 insertions, 10 deletions
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init
index 86d731b..9357030 100755
--- a/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server-mtcap/lora-network-server.init
@@ -1,6 +1,7 @@
#!/bin/bash
NAME="lora-network-server"
+LOCK="/var/lock/$NAME"
ENABLED="yes"
START_STOP_DAEMON="/usr/sbin/start-stop-daemon"
@@ -10,7 +11,6 @@ START_STOP_DAEMON="/usr/sbin/start-stop-daemon"
run_dir=/var/run/lora
conf_dir=/var/config/lora
conf_file=/opt/lora/lora-network-server.conf
-conf_db=$conf_dir/lora-network-server.db
net_server=/opt/lora/lora-network-server
net_server_log=/var/log/lora-network-server.log
@@ -57,16 +57,33 @@ if [ "$ENABLED" != "yes" ]; then
exit
fi
+force_stop() {
+ do_stop
+ rm -fr $LOCK
+}
+
+function try_lock() {
+ if mkdir $LOCK; then
+ trap "rm -fr $LOCK" EXIT
+ else
+ echo "Lora Network Server lock not acquired, resource in use"
+ exit 1
+ fi
+}
+
+
case "$1" in
"start")
+ try_lock
do_start
;;
"stop")
- do_stop
+ force_stop
;;
"restart")
## Stop the service and regardless of whether it was
## running or not, start it again.
+ try_lock
do_stop
do_start
;;
diff --git a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.16.bb b/recipes-connectivity/lora/lora-network-server-mtcap_2.0.13.bb
index d23d823..7523cbf 100644
--- a/recipes-connectivity/lora/lora-network-server-mtcap_1.0.16.bb
+++ b/recipes-connectivity/lora/lora-network-server-mtcap_2.0.13.bb
@@ -5,8 +5,8 @@ PRIORITY = "optional"
SECTION = "console/utils"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7ffae4666a986c4ccf45e99e464f8402"
-DEPENDS = "jsoncpp libmts mosquitto sqlite3"
-RDEPENDS_${PN} += "lora-packet-forwarder logrotate"
+DEPENDS = "jsoncpp libmts mosquitto sqlite3 curl gnutls"
+RDEPENDS_${PN} += "lora-packet-forwarder logrotate bash"
PR = "r3"
SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${PV}.tar.gz \
@@ -17,8 +17,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${
file://local_conf.json \
"
-SRC_URI[md5sum] = "3169970ea9b96656847d7472a2cf1f0f"
-SRC_URI[sha256sum] = "81b3c348911464fccbb70e3ff0c60dbcf77af69c2205aec3591fc2ceff7a5c52"
+SRC_URI[md5sum] = "3c9c62d0e721a4b588d602cc36052798"
+SRC_URI[sha256sum] = "3499b14fc84c241401cf13089298192e1e3c4df2b977381f823b4aa82263b781"
# binaries are already stripped, so suppress warning
INSANE_SKIP_${PN} = "already-stripped"
diff --git a/recipes-connectivity/lora/lora-network-server/lora-network-server.init b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
index 032a0f7..dec846f 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -12,7 +12,6 @@ ENABLED="yes"
run_dir=/var/run/lora
conf_dir=/var/config/lora
conf_file=$conf_dir/lora-network-server.conf
-conf_db=$conf_dir/lora-network-server.db
net_server=/opt/lora/lora-network-server
@@ -119,7 +118,7 @@ do_start() {
start-stop-daemon --start --background --make-pidfile \
--pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $net_server \
-c $conf_file --lora-eui $lora_eui --lora-prod-1 $lora_id --lora-hw-1 $lora_hw \
- --lora-path $run_dir --db $conf_db \
+ --lora-path $run_dir \
--noconsole -l $net_server_log >> $net_server_log 2>&1"
sleep 2
# start packet forwarder
diff --git a/recipes-connectivity/lora/lora-network-server_2.0.9.bb b/recipes-connectivity/lora/lora-network-server_2.0.13.bb
index ca2eea8..2fc1f38 100644
--- a/recipes-connectivity/lora/lora-network-server_2.0.9.bb
+++ b/recipes-connectivity/lora/lora-network-server_2.0.13.bb
@@ -14,8 +14,8 @@ SRC_URI = "http://multitech.net/downloads/lora-network-server_${TUNE_PKGARCH}_${
file://lora-network-server.logrotate.conf \
"
-SRC_URI[md5sum] = "1ff17152fec87a38d21edf6f0a037deb"
-SRC_URI[sha256sum] = "ba21d1afab6882341abf245d899631a6ba752fbd055a731f9cc195796b2f4e48"
+SRC_URI[md5sum] = "3c9c62d0e721a4b588d602cc36052798"
+SRC_URI[sha256sum] = "3499b14fc84c241401cf13089298192e1e3c4df2b977381f823b4aa82263b781"
# binaries are already stripped, so suppress warning
INSANE_SKIP_${PN} = "already-stripped"