mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-02 17:33:23 +00:00
Add in auto_close functionality
Set whether terminal windows close after given numnber of seconds or wait until input given into terminal windows
This commit is contained in:
parent
23483ce362
commit
2b7ec74e6a
4 changed files with 28 additions and 5 deletions
|
@ -25,6 +25,9 @@ sub script {
|
|||
my $comms = $config->{comms};
|
||||
my $comms_args = $config->{$comms.'_args'};
|
||||
my $command = $config->{command};
|
||||
my $autoclose = $config->{auto_close};
|
||||
|
||||
my $postcommand = $autoclose ? "echo Press RETURN to continue; read IGNORE" : "sleep $autoclose";
|
||||
|
||||
# # P = pipe file
|
||||
# # s = server
|
||||
|
@ -116,7 +119,7 @@ sub script {
|
|||
\$command .= "\$svr";
|
||||
}
|
||||
}
|
||||
\$command .= " $command || sleep 5";
|
||||
\$command .= " $command ; $postcommand";
|
||||
warn("Running:\$command\\n"); # for debug purposes
|
||||
exec(\$command);
|
||||
HERE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue