return @addresses;
}
-return 1;
+sub get_custom_srvgrp_ports ($$) {
+ my ($group_name, $proto) = @_;
+
+ # Array to store the found port numbers.
+ my @ports = ();
+
+ # Loop through the hash of customservicegrp
+ foreach my $key (keys %customservicegrp) {
+ # Skip entries which does not have the correct group name.
+ next unless($customservicegrp{$key}[0] eq "$group_name");
+
+ # Get created service name
+ my $service = $customservicegrp{$key}[2];
+
+ # Grab the configured port number for the service name
+ my $port = &get_srv_port($service, 1, $proto);
+
+ # Skip entry if no port could be grabbed.
+ next unless($port);
+
+ # Add the port to the array of ports.
+ push(@ports, $port);
+ }
+
+ # Remove any double entries.
+ @ports = &General::uniq(@ports);
+
+ # Sort the port numbers.
+ @ports = sort(@ports);
+
+ # Return the port array.
+ return @ports;
+}
+
+1;