summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-network-server
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2023-04-25 16:33:12 -0500
committerHarsh Sharma <harsh.sharma@multitech.com>2023-04-25 16:33:12 -0500
commitde6267995788dc15f6551998deabc4e9c0b08b67 (patch)
tree0e0e24241d9c59ff8f330946af9506fe9aaa26ac /recipes-connectivity/lora/lora-network-server
parent1d7df5598e3d0f3a7c0698596fafc776d5eb8737 (diff)
downloadmeta-mlinux-de6267995788dc15f6551998deabc4e9c0b08b67.tar.gz
meta-mlinux-de6267995788dc15f6551998deabc4e9c0b08b67.tar.bz2
meta-mlinux-de6267995788dc15f6551998deabc4e9c0b08b67.zip
Added angel process to lns and pkf
Diffstat (limited to 'recipes-connectivity/lora/lora-network-server')
-rwxr-xr-xrecipes-connectivity/lora/lora-network-server/lora-network-server.init15
1 files changed, 9 insertions, 6 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 3c2764a..e2e376b 100755
--- a/recipes-connectivity/lora/lora-network-server/lora-network-server.init
+++ b/recipes-connectivity/lora/lora-network-server/lora-network-server.init
@@ -8,6 +8,7 @@ ENABLED="yes"
[ -f /etc/default/$NAME ] && source /etc/default/$NAME
+angel=/sbin/angel
run_dir=/var/run/lora
conf_dir=/var/config/lora
@@ -339,10 +340,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 $net_server \
+ --pidfile $net_server_pidfile --startas /bin/bash -- -c "exec $angel $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 2>&1"
+ --noconsole"
if [ "$no_lora_hw" != "true" ]; then
# start packet forwarder
@@ -351,17 +352,19 @@ do_start() {
/usr/sbin/start-stop-daemon --chdir $run_dir/1 --start --background --make-pidfile \
--pidfile $pkt_fwd_pidfile --startas /bin/bash \
- -- -c "exec $pkt_fwd $pkt_fwd_options 2>&1"
+ -- -c "exec $angel $pkt_fwd $pkt_fwd_options"
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 $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
+ -- -c "exec $angel $pkt_fwd_2 $pkt_fwd_options -l $pkt_fwd_2_log"
fi
fi
- renice -n -20 -p $(pgrep lora-network-se)
- renice -n -20 -p $(pgrep $(basename $pkt_fwd))
+ 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
echo "OK"
}