From: Victor Wagner Date: Wed, 3 Dec 2025 11:59:46 +0000 (+0300) Subject: Fix xmpp notification X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=17ffb2c8847f06905536712d3f93f5f3ef9387f3;p=oss%2Frestore.git Fix xmpp notification 1. Properly call xmppc from notify-messages.xmpp 2. Move notification about successful backup after drive unmounting, --- diff --git a/backup b/backup index fad452e..f2eeb51 100755 --- a/backup +++ b/backup @@ -101,7 +101,6 @@ while (@levels) { } run_rsnapshot($level); -notify("Backup to disk $disk_id completed successfully\n"); # Размонтируем файловую систему, содержащую snapshot_root $device =~ s/\d$//; # remove partition number @@ -121,6 +120,7 @@ for $device (@to_umount) { } } +notify("Backup to disk $disk_id completed successfully\n"); if (@baddevs) { notify("Cannot unmount device(s) ".join(", ",@baddevs).".\n") } diff --git a/notify-messenger.xmpp b/notify-messenger.xmpp index a616dd7..c5685c8 100755 --- a/notify-messenger.xmpp +++ b/notify-messenger.xmpp @@ -5,5 +5,8 @@ # configured in root's # ~/.config/xmppc.conf # should be renamed to just notify-messenger to use. + +# XMPP user to notifty +ADMIN=vitus@wagner.pp.ru read -r message -xmppc -m message chat vitus@wagner.pp.ru "$message" +xmppc -m message chat $ADMIN "$message"