From cd43b127a023deb72f61510359a176950f9e0453 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Wed, 25 Oct 2023 21:41:09 +0300 Subject: [PATCH] Debugged matrix notifications --- backup | 2 +- notify-messenger | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backup b/backup index d01a64c..84c1d89 100755 --- a/backup +++ b/backup @@ -133,7 +133,7 @@ sub notify { my $notifier = "/usr/local/sbin/notify-messenger"; if ( -x $notifier) { $hostname = Sys::Hostname::hostname(); - open my $pipe,"|",$notifier; + open my $pipe,"|$notifier"; print $pipe "$hostname: $msg"; close $pipe; } diff --git a/notify-messenger b/notify-messenger index ac83092..dfad9b0 100755 --- a/notify-messenger +++ b/notify-messenger @@ -3,6 +3,8 @@ # sysadmin about backup status # This version sends message to default matrix room configured in root's # ~/.config/matrix-commander/credentials.json +# and expected that matrix-commander store is in th ${HOME}/store of +# invoking user(root) # You can use XMPP or some proprietary messenger such as telegram # instead -matrix-commander -m - +matrix-commander -m - -s ${HOME}/store -- 2.39.2