mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 11:32:41 +00:00
subscription delete: followup fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
85222f8237
commit
e82ed1675b
@ -205,7 +205,7 @@ __PACKAGE__->register_method ({
|
||||
proxyto => 'node',
|
||||
protected => 1,
|
||||
parameters => {
|
||||
additionalProperties => 0,
|
||||
additionalProperties => 0,
|
||||
properties => {
|
||||
node => get_standard_option('pve-node'),
|
||||
key => {
|
||||
@ -252,11 +252,11 @@ __PACKAGE__->register_method ({
|
||||
permissions => {
|
||||
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
|
||||
},
|
||||
description => "Set subscription key.",
|
||||
description => "Delete subscription key.",
|
||||
proxyto => 'node',
|
||||
protected => 1,
|
||||
parameters => {
|
||||
additionalProperties => 0,
|
||||
additionalProperties => 0,
|
||||
properties => {
|
||||
node => get_standard_option('pve-node'),
|
||||
},
|
||||
@ -264,7 +264,7 @@ __PACKAGE__->register_method ({
|
||||
returns => { type => 'null'},
|
||||
code => sub {
|
||||
my $subscription_file = '/etc/subscription';
|
||||
return if ! -e $subscription_file;
|
||||
return if ! -e $subscription_file;
|
||||
unlink($subscription_file) or die "cannot delete subscription key: $!";
|
||||
return undef;
|
||||
}});
|
||||
|
Loading…
Reference in New Issue
Block a user