summaryrefslogtreecommitdiff
path: root/recipes-connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init15
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init10
2 files changed, 11 insertions, 14 deletions
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 e2e376b..3c2764a 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -8,7 +8,6 @@ ENABLED="yes"
[ -f /etc/default/$NAME ] && source /etc/default/$NAME
-angel=/sbin/angel
run_dir=/var/run/lora
conf_dir=/var/config/lora
@@ -340,10 +339,10 @@ do_start() {
echo -n "Starting $NAME: "
# start network server
start-stop-daemon --start --background --make-pidfile \
- --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $angel $net_server \
+ --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $net_server \
-c $conf_file --lora-eui $lora_eui --lora-hw-1 $lora_hw --lora-prod-1 $lora_id $lora_2_args \
--lora-path $run_dir \
- --noconsole"
+ --noconsole 2>&1"
if [ "$no_lora_hw" != "true" ]; then
# start packet forwarder
@@ -352,19 +351,17 @@ do_start() {
/usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \
--pidfile $pkt_fwd_pidfile --startas /bin/bash \
- -- -c "exec $angel $pkt_fwd $pkt_fwd_options"
+ -- -c "exec $pkt_fwd $pkt_fwd_options 2>&1"
if [ "$dual_cards_installed" == "true" ]; then
/usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \
--pidfile $pkt_fwd_2_pidfile --startas /bin/bash \
- -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
+ -- -c "exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
fi
fi
- renice -n -20 -p $(ps aux | grep angel | grep $(basename $pkt_fwd) | awk '{print $2}') &>/dev/null
- renice -n -20 -p $(ps aux | grep angel | grep lora-net | awk '{print $2}') &>/dev/null
- renice -n -20 -p $(pgrep $(basename $pkt_fwd)) &>/dev/null
- renice -n -20 -p $(pgrep lora-network-se) &>/dev/null
+ renice -n -20 -p $(pgrep lora-network-se)
+ renice -n -20 -p $(pgrep $(basename $pkt_fwd))
echo "OK"
}
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
index 904737d..6320d2a 100755
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
@@ -4,7 +4,6 @@
NAME="lora-packet-forwarder"
LOCK="/var/lock/$NAME"
ENABLED="yes"
-angel=/sbin/angel
[ -f /etc/default/$NAME ] && source /etc/default/$NAME
@@ -417,17 +416,18 @@ do_start() {
echo -n "Starting $NAME: "
/usr/sbin/start-stop-daemon --chdir $run_dir/1 --background --start --make-pidfile \
- --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $angel $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log"
+ --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log"
if [ "$dual_cards_installed" == "true" ]; then
/usr/sbin/start-stop-daemon --chdir $run_dir/2 --start --background --make-pidfile \
--pidfile $pkt_fwd_2_pidfile --startas /bin/bash \
- -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
+ -- -c "exec $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
fi
- renice -n -20 -p $(ps aux | grep angel | grep $(basename $pkt_fwd) | awk '{print $2}') &>/dev/null
- renice -n -20 -p $(pgrep $(basename $pkt_fwd)) &>/dev/null
+ if [[ ! "$hw_id" =~ "$mtcdt3_id" ]]; then
+ renice -n -20 -p $(pgrep $(basename $pkt_fwd))
+ fi
echo "OK"
}