summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-packet-forwarder
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2023-04-26 14:06:09 -0500
committerHarsh Sharma <harsh.sharma@multitech.com>2023-04-26 14:06:09 -0500
commita1133448db1de94c8932f055ec348962ddfdf1a1 (patch)
tree7c8a334fd059373a62ed4f3868d46d1bd4412093 /recipes-connectivity/lora/lora-packet-forwarder
parent9d5804611ee107dad6076c73d64b17747d000833 (diff)
downloadmeta-mlinux-a1133448db1de94c8932f055ec348962ddfdf1a1.tar.gz
meta-mlinux-a1133448db1de94c8932f055ec348962ddfdf1a1.tar.bz2
meta-mlinux-a1133448db1de94c8932f055ec348962ddfdf1a1.zip
Revert "Revert "Added angel process to lns and pkf""
This reverts commit 63e834718625144f8386d6556c9a107eea3d9628.
Diffstat (limited to 'recipes-connectivity/lora/lora-packet-forwarder')
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init10
1 files changed, 5 insertions, 5 deletions
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 6320d2a..904737d 100755
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
@@ -4,6 +4,7 @@
NAME="lora-packet-forwarder"
LOCK="/var/lock/$NAME"
ENABLED="yes"
+angel=/sbin/angel
[ -f /etc/default/$NAME ] && source /etc/default/$NAME
@@ -416,18 +417,17 @@ 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 $pkt_fwd $pkt_fwd_options -l $pkt_fwd_log"
+ --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $angel $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 $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
- if [[ ! "$hw_id" =~ "$mtcdt3_id" ]]; then
- renice -n -20 -p $(pgrep $(basename $pkt_fwd))
- 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
echo "OK"
}