as a fallback to ensure rotation even if no logins happen on a given
cluster.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
use PVE::RPCEnvironment;
use PVE::API2::Subscription;
use PVE::AutoBalloon;
+use PVE::AccessControl;
use PVE::Status::Plugin;
use PVE::Status::Graphite;
}
}
+sub rotate_authkeys {
+ PVE::AccessControl::rotate_authkey() if !PVE::AccessControl::check_authkey(1);
+}
+
sub update_status {
# update worker list. This is not really required and
};
$err = $@;
syslog('err', "lxc console cleanup error: $err") if $err;
+
+ eval {
+ rotate_authkeys();
+ };
+ $err = $@;
+ syslog('err', "authkey rotation error: $err") if $err;
+
}
my $next_update = 0;