mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
CLI create agent fixed add address to taddress
This commit is contained in:
parent
50ef2f6e54
commit
f8c7241cc8
@ -1126,8 +1126,13 @@ sub cli_create_agent() {
|
|||||||
exist_check($id_group,'operating system',$group_name);
|
exist_check($id_group,'operating system',$group_name);
|
||||||
my $agent_exists = get_agent_id($dbh,$agent_name);
|
my $agent_exists = get_agent_id($dbh,$agent_name);
|
||||||
non_exist_check($agent_exists, 'agent name', $agent_name);
|
non_exist_check($agent_exists, 'agent name', $agent_name);
|
||||||
pandora_create_agent ($conf, $server_name, $agent_name, $address, $id_group, 0, $os_id, $description, $interval, $dbh,
|
my $agent_id = pandora_create_agent ($conf, $server_name, $agent_name, $address, $id_group, 0, $os_id, $description, $interval, $dbh,
|
||||||
undef, undef, undef, undef, undef, undef, undef, undef, $agent_alias);
|
undef, undef, undef, undef, undef, undef, undef, undef, $agent_alias);
|
||||||
|
|
||||||
|
# Create address for this agent in taddress.
|
||||||
|
if (defined($address)) {
|
||||||
|
pandora_add_agent_address($conf, $agent_id, $agent_name, $address, $dbh);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user