mirror of https://github.com/sipwise/ngcpcfg.git
Change-Id: I6f8cc15d7687ee0a89c9b22b42e450c5363bd162changes/02/14102/1
parent
a4dd0365ef
commit
e597d2b342
@ -0,0 +1,16 @@
|
||||
[%
|
||||
# Returns the name of the management node calling this function.
|
||||
#
|
||||
# @return out mgmt name (e.g. 'web01' or 'db01')
|
||||
-%]
|
||||
[% PERL -%]
|
||||
my $filename = '/etc/ngcp_mgmt_node';
|
||||
open my $hh, '<', $filename or die "Error opening $filename";
|
||||
my $mgmt_name = <$hh>;
|
||||
close $hh;
|
||||
chomp $mgmt_name;
|
||||
die "Fatal error retrieving mgmt_name [$mgmt_name]" unless length $mgmt_name;
|
||||
|
||||
$stash->set(out => $mgmt_name);
|
||||
return;
|
||||
[% END -%]
|
||||
Loading…
Reference in new issue