]> git.proxmox.com Git - pve-manager.git/blob - bin/pveam
adf1de6966da6bfe75d028cf9bc2855eb05d93de
[pve-manager.git] / bin / pveam
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use PVE::Cluster;
6 use PVE::APLInfo;
7
8 if (scalar (@ARGV) != 1) {
9 print STDERR "usage: $0 CMD\n";
10 exit (-1);
11 }
12
13 my $cmd = shift;
14
15 if ($cmd eq 'update') {
16 my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg');
17 exit (0) if PVE::APLInfo::update($dccfg->{http_proxy});
18 print STDERR "update failed - see /var/log/pveam.log for details\n";
19 exit (-1);
20 } else {
21 print STDERR "unknown CMD '$cmd'\n";
22 exit (-1);
23 }