summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-packet-forwarder
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2018-05-21 10:43:55 -0500
committerJason Reiss <jreiss@multitech.com>2018-05-21 10:43:55 -0500
commit2d19c4d653ec6b52df7ef15771edec5374eaf32e (patch)
tree70acde29949b48c951e790381c9eae356e187990 /recipes-connectivity/lora/lora-packet-forwarder
parent8959ea2dd7f1c4f75ee90a198610839b854a2e07 (diff)
downloadmeta-mlinux-2d19c4d653ec6b52df7ef15771edec5374eaf32e.tar.gz
meta-mlinux-2d19c4d653ec6b52df7ef15771edec5374eaf32e.tar.bz2
meta-mlinux-2d19c4d653ec6b52df7ef15771edec5374eaf32e.zip
lora: add packet forwarder logging and rotation configuration
Diffstat (limited to 'recipes-connectivity/lora/lora-packet-forwarder')
-rwxr-xr-xrecipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init2
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.logrotate.conf7
2 files changed, 8 insertions, 1 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 fa78949..d94d4dc 100755
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.init
@@ -160,7 +160,7 @@ 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"
+ --pidfile $pkt_fwd_pidfile --startas /bin/bash -- -c "exec $pkt_fwd $pkt_fwd_options &>$pkt_fwd_log"
renice -n -20 -p $(pgrep $(basename $pkt_fwd))
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.logrotate.conf b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.logrotate.conf
new file mode 100644
index 0000000..01a1cc0
--- /dev/null
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder.logrotate.conf
@@ -0,0 +1,7 @@
+/var/log/lora-*.log {
+ size 512k
+ rotate 4
+ compress
+ copytruncate
+ missingok
+}