Avoid OAuth2 refresh token expiry by forcing a notification target
refresh in PVE's daily-update job.

Signed-off-by: Arthur Bied-Charreton <[email protected]>
---
 bin/pveupdate | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/pveupdate b/bin/pveupdate
index b1960c35..86d3d3cd 100755
--- a/bin/pveupdate
+++ b/bin/pveupdate
@@ -195,4 +195,13 @@ sub cleanup_tasks {
 
 cleanup_tasks();
 
+eval {
+    my $config = PVE::Notify::read_config();
+    # Refresh internal state for notification targets
+    $config->refresh_targets();
+};
+if (my $err = $@) {
+    syslog('err', "refresh notification targets failed: $err");
+}
+
 exit(0);
-- 
2.47.3



Reply via email to