But on-the-other-hand, it’s home automation, not IT automation.
Why do you need to get the logs from Karaf? Can’t you use Frontail on the openhab.log and events.log? Then you can put the browser into kiosk mode and there you have it.
I can’t say for sure but because you are kicking this off from a bat file there may be some issue with receiving updates.
Perhaps, but since they both have the same information why add the complexity of needing to log into the karaf console?
You should look into multitail.
Here is my Ansible playbook for installing multitail and Christoph’s color scheme.
---
- name: Install prerequisites
apt:
name: "{{ item }}"
update_cache: no
become: yes
with_items:
- libncurses5
- libncurses5-dev
- libncursesw5
- libncursesw5-dev
- name: Create multitail folder
file:
path: "{{ multitail_home }}"
state: directory
mode: a+rwx
become: yes
- name: Clone multitail
git:
repo: https://github.com/flok99/multitail.git
force: yes
dest: "{{ multitail_home }}"
- name: Build and install multitail
make:
chdir: "{{ multitail_home }}"
target: install
become: yes
- name: Add multitail to the path
lineinfile:
path: /home/rich/.config/fish/config.fish
line: set -gx PATH /opt/local/bin $PATH
- name: Copy the default multitail.conf
copy:
src: /opt/local/etc/multitail.conf.new
dest: "{{ multitail_conf_file }}"
remote_src: yes
become: yes
- name: Add check_mail:0
lineinfile:
path: "{{ multitail_conf_file }}"
line: "check_mail:0"
become: yes
- name: Clone the openHAB color scheme
git:
repo: "{{ openhab_color_url }}"
dest: /tmp/multitail-scheme-openhab
- name: Copy color scheme into multitail.conf
shell: cat /tmp/multitail-scheme-openhab/multitail-scheme-openhab.conf >> {{ multitail_conf_file }}
become: yes
- name: Remove line with path to openhab logs
lineinfile:
path: "{{ multitail_conf_file }}"
line: scheme:openhab:/var/log/openhab2/
state: absent
become: yes
- name: Add path to openhab logs
lineinfile:
path: "{{ multitail_conf_file }}"
line: scheme:openhab:{{ openhab_logs_dir }}
become: yes
NOTE: I run in Docker so the log files are not in the default locations for me.