Add syslog setup for shuttercontrol.log

This commit is contained in:
Stefan Haun 2022-07-23 20:47:16 +02:00
parent ca31f218c0
commit f257396bc2
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,4 @@
if $programname == 'lockfailsafe' then /var/log/shuttercontrol.log
if $programname == 'shuttercontrol' then /var/log/shuttercontrol.log
if $programname == 'doorservice' then /var/log/shuttercontrol.log
& ~

View file

@ -209,9 +209,31 @@
creates: "/home/{{ gatekeeper_user }}/mqtt-tools/agents/mqtt-clock"
### Syslog setup for shuttercontrol.log
- name: Make sure shuttercontrol.log exists
ansible.builtin.file:
path: /var/log/shuttercontrol.log
state: touch
- name: Copy syslog setting for shuttercontrol
ansible.builtin.copy:
src: files/platon/syslog-shuttercontrol.conf
dest: /etc/rsyslog.d/20-shuttercontrol.conf
owner: root
group: root
mode: "0644"
notify: restart rsyslog
handlers:
- name: restart mosquitto
service:
name: mosquitto
state: restarted
enabled: yes
- name: restart rsyslog
service:
name: rsyslog
state: restarted
enabled: yes