X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=v2%2Fsrc%2Fawk%2Fexe%2Factuate_alert_to_notify_send.awk;fp=v2%2Fsrc%2Fawk%2Fexe%2Factuate_alert_to_notify_send.awk;h=0000000000000000000000000000000000000000;hb=499c58a269a00e031302938b5a8f006f23aae451;hp=3cfbca0fb8dd269d4285f96d34be176754ea8fa7;hpb=4c703fadbdc17d1753d16841582636598f862416;p=khatus.git diff --git a/v2/src/awk/exe/actuate_alert_to_notify_send.awk b/v2/src/awk/exe/actuate_alert_to_notify_send.awk deleted file mode 100644 index 3cfbca0..0000000 --- a/v2/src/awk/exe/actuate_alert_to_notify_send.awk +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN { - # Set the correct value as any other AWK variable: - # - # khatus_actuate_alert_to_notify_send -v Display="$CORRECT_DISPLAY" - # - Display = Display ? Display : ":0" -} - -{ - delete msg - msg_parse(msg, $0) -} - -msg["type"] == "alert" { - body = msg["body"] - sep = body ? "\n" : "" - body = body sep "--" msg["node"] ":" msg["module"] - urgency = msg["priority"] - sub("hi" , "critical", urgency) - sub("med", "normal" , urgency) - - cmd = \ - sprintf(\ - "DISPLAY=%s notify-send -u %s %s \" %s\"", - Display, urgency, msg["subject"], body \ - ) - system(cmd) - next -}