]>
git.proxmox.com Git - pve-client.git/blob - PVE/APIClient/Config.pm
86007d2917573c5b1f52167c23c706ecc88e1c23
1 package PVE
::APIClient
::Config
;
12 my $filename = home
() . '/.pveclient';
13 my $conf_str = PVE
::Tools
::file_get_contents
($filename);
15 my $filemode = (stat($filename))[2] & 07777;
16 if ($filemode != 0600) {
17 die sprintf "wrong permissions on '$filename' %04o (expected 0600)\n", $filemode;
20 return decode_json
($conf_str);