Closed dirkclemens closed 6 years ago
@dirkclemens You need to configure the cronjob to get and store this information in FireMotD.json. The information you do see is generated at logon, the rest needs to be generated with a cronjob. (unless you edit the FireMotD.json yourself)
/usr/local/bin/FireMotD -S
Let me know how it goes.
@willemdh to prevent this misunderstanding in future maybe it would be a good idea to show a warning when the json is old or missing?
@ThomDietrich Good idea, I'll see about adding that. Also you need the packages moreutils
and jq
to make it work.
+1 for the ability to dynamically generate the JSON during each run. Maybe a "-D" flag or something, although I understand it may not be super optimized.
I'm using a custom template to show a limited block of information on a 3.5" touchscreen.
############################################################
############################################################
## Ip -> 192.168.1.144
## Release -> Raspbian GNU/Linux 9 (stretch)
## Kernel -> Linux 4.14.34-v7+
## Platform -> Raspberry Pi 3 Model B Plus Rev 1.3
## Updates -> 18 apt updates available.
############################################################
############################################################
After running sudo apt-get update
and sudo apt-get dist-upgrade
, I was still shown the output above, although my IP had changed, and the packages had been updated.
I stumbled across this issue and /usr/local/bin/FireMotD -S
did the trick:
############################################################
############################################################
## Ip -> 192.168.1.73
## Release -> Raspbian GNU/Linux 9 (stretch)
## Kernel -> Linux 4.14.34-v7+
## Platform -> Raspberry Pi 3 Model B Plus Rev 1.3
## Updates -> 0 apt updates available.
############################################################
############################################################
I wouldn't mind waiting N seconds for the file to generate before being displayed, just so long as its up-to-date 👍
Killer lib by the way!
@mikechabot you can already define in the template when information is updated. Just put @logon instead of @cron check https://github.com/OutsideIT/FireMotD/blob/master/FireMotD-reference.json
@willemdh Ugh, how'd I miss that. Awesome, tyvm.
Closing this, a warning is shown when the exportfile is unexistant
since upgrading to Stretch most functions no longer report correct values: