Skip to content

Commit

Permalink
Remove double spaces from pkill command
Browse files Browse the repository at this point in the history
  • Loading branch information
David Barnes committed May 19, 2021
1 parent ca975d5 commit ddbce69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Jobs/CreateTunnel.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ protected function verifyTunnel()
*/

public function destoryTunnel(){
return $this->runCommand('pkill -f "'.$this->sshCommand.'"');
$ssh_command = preg_replace('/[\s]{2}[\s]*/',' ',$this->sshCommand);
return $this->runCommand('pkill -f "'.$ssh_command.'"');
}

/**
Expand Down

0 comments on commit ddbce69

Please sign in to comment.