|
@@ 74-79 (lines=6) @@
|
| 71 |
|
public function command($command) |
| 72 |
|
{ |
| 73 |
|
if ('status 2' === $command) { |
| 74 |
|
if ('tcp://10.42.101.101:11940' === $this->socketAddress) { |
| 75 |
|
// send back the returnData as an array |
| 76 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_status.txt')); |
| 77 |
|
} else { |
| 78 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_status_no_clients.txt')); |
| 79 |
|
} |
| 80 |
|
} elseif ('kill' === $command) { |
| 81 |
|
if ('tcp://10.42.101.101:11940' === $this->socketAddress) { |
| 82 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_kill_success.txt')); |
|
@@ 80-86 (lines=7) @@
|
| 77 |
|
} else { |
| 78 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_status_no_clients.txt')); |
| 79 |
|
} |
| 80 |
|
} elseif ('kill' === $command) { |
| 81 |
|
if ('tcp://10.42.101.101:11940' === $this->socketAddress) { |
| 82 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_kill_success.txt')); |
| 83 |
|
} else { |
| 84 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/openvpn_23_kill_error.txt')); |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
/** |