summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-packet-forwarder
diff options
context:
space:
mode:
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
+}