Skip to content

Instantly share code, notes, and snippets.

@jose-d
Created January 11, 2021 19:01
Show Gist options
  • Select an option

  • Save jose-d/8a054ea87181e57463d4eddc6f6b9abe to your computer and use it in GitHub Desktop.

Select an option

Save jose-d/8a054ea87181e57463d4eddc6f6b9abe to your computer and use it in GitHub Desktop.
module(load="omprog")
template(name="script_template" type="string" string="%msg%\n")
if $msg contains "Error received in UDP connection under DTLS" then
{
action(type="omprog"
name="restart_hass"
binary="/bin/bash -c '/mnt/1g/hass/restart.sh'"
action.resumeInterval="5"
killUnresponsive="on"
template="script_template"
forceSingleInstance="off"
output="/var/log/restart_hass.log")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment