Skip to content

Instantly share code, notes, and snippets.

View Julybui199x's full-sized avatar

Julybui199x

  • 21:19 (UTC +07:00)
View GitHub Profile
@stakemepro
stakemepro / set-ports-node.js
Last active September 18, 2023 01:03
Auto set free port in cosmos node
const shell = require("shelljs");
const TOKEN = process.argv[2];
const CONFIG = process.argv[3];
function openPort(port) {
return shell.exec(`sudo lsof -Pi :${port} -sTCP:LISTEN`, {shell: '/bin/bash', silent: true}).code !== 0;
}
for (let i = 0; i < 60; i++) {