just ping another machine
This commit is contained in:
13
perl/ping.pl
Executable file
13
perl/ping.pl
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
use Net::Ping;
|
||||||
|
|
||||||
|
while ( 0 == 0 ) {
|
||||||
|
my $host = "10.0.0.1";
|
||||||
|
my $p = Net::Ping->new();
|
||||||
|
system( "/usr/local/bin/truecrypt --text --dismount --force > /dev/null 2>&1" ) if ( ! $p->ping( $host ) );
|
||||||
|
$p->close();
|
||||||
|
sleep(1);
|
||||||
|
}
|
Reference in New Issue
Block a user