diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/is_port_available.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/is_port_available.pl b/scripts/is_port_available.pl new file mode 100755 index 00000000..52a5ad0f --- /dev/null +++ b/scripts/is_port_available.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl +# Check to see if the supplied IPv4 or IPv6 address is an existing local address + +use strict; +use lib "/opt/vyatta/share/perl5"; +use Vyatta::Misc; + +my $ip = $ARGV[0]; +my $port = $ARGV[1]; + +if(!defined($ip) || !defined($port) || !is_port_available($ip, $port)) { + exit 1; +} else { + exit 0; +}
\ No newline at end of file |