We have moved at community.getvera.com

Author Topic: monitoring openLuup reloads  (Read 499 times)

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
monitoring openLuup reloads
« on: December 06, 2016, 12:45:48 pm »
Does reloading openLuup ALWAY involve running this script??

I am asking because I would like to add a little lua script to append to a log file when openLuup reloads - I assume it should be in the loop ?


Code: [Select]
#!/bin/sh
#
# reload loop for openLuup
# @akbooer, Aug 2015
# you may need to change ?lua? to ?lua5.1? depending on your install

lua5.1 openLuup/init.lua $1

while [ $? -eq 42 ]
do
   lua5.1 openLuup/init.lua
done

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: monitoring openLuup reloads
« Reply #1 on: December 06, 2016, 01:30:54 pm »
Yes, but I don't recommend that you do change it.

The easiest approach to doing what you want would be to write to your log file in the Lua Startup code that is also run on every reload.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: monitoring openLuup reloads
« Reply #2 on: December 06, 2016, 02:12:24 pm »
yes would prefer that but I wasnt sure how early it would run in the process - if you recall I had a problem with altui asking for multiple reloads (up to 9/10) very early on in the process