UNPKG
rdtool
Version:
latest (1.0.5)
1.0.5
1.0.4
A simple Node.js-based remote deployment tool that makes deployments easier with config files.
rdtool
/
src
/
exec-plugins
/
remote-hasPort.js
11 lines
(9 loc)
•
271 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
{ execServerCommand } =
require
(
"../tools"
);
async
function
exec
(
client, config, port
) {
const
res =
await
execServerCommand
(client,
`netstat -tuln | grep
${port}
`
);
return
Boolean
(res) }
module
.
exports
= {
name
:
"remote-hasPort"
, exec }