Skip to content

Commit

Permalink
Fix tcpbench service startup in netlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Dec 23, 2023
1 parent fc248e7 commit ca51b68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions netlink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,18 @@ sub good {
if ($pid == 0) {
my @sshcmd = ('ssh', $lnx_r_ssh, 'cat', '-', '>',
'/etc/systemd/system/tcpbench.service');
print "@sshcmd\n" if $verbose;
exec(@sshcmd);
warn "Exec '@sshcmd' failed: $!";
_exit(126);
}
print $lnx_tcpbench_service <<'EOF' if ($testmode{tcp4} || $testmode{tcp6});
print $lnx_tcpbench_service <<'EOF';
[Unit]
Description=OpenBSD tcpbench server
After=network.target auditd.service
[Service]
ExecStart=/usr/local/bin/tcpbench -s
ExecStart=/usr/bin/tcpbench -s
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
Expand Down Expand Up @@ -1297,6 +1298,6 @@ sub ping_f_parser {
sub mysystem {
my @cmd = @_;
print(join ' ', @cmd, "\n") if $verbose;
print "@cmd\n" if $verbose;
system(@cmd);
}

0 comments on commit ca51b68

Please sign in to comment.