]> git.proxmox.com Git - pve-manager.git/blobdiff - bin/pveupdate
subscription: switch to Proxmox::RS::Subscription
[pve-manager.git] / bin / pveupdate
index 99b52fe989873707cd874901dfa8699251d846cd..3dc4cbe6666e2469fa15ace70b9c41f0772c1ec8 100755 (executable)
@@ -49,10 +49,10 @@ if (my $err = $@) {
     syslog ('err', "update appliance info failed - see /var/log/pveam.log for details");
 }
 
-my $info = PVE::INotify::read_file('subscription');
+my $info = eval { PVE::API2::Subscription::read_etc_subscription() };
 # We assume that users with subscriptions want informations
 # about new packages.
-my $notify = ($info && $info->{status} eq 'Active') ? 1 : 0;
+my $notify = ($info && $info->{status} eq 'active') ? 1 : 0;
 eval { PVE::API2::APT->update_database({ node => $nodename, notify => $notify, quiet => 1 }); };
 if (my $err = $@) {
     syslog ('err', "update apt database failed: $err");