Commit 2206fc2d authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent dbcf28e9
Pipeline #11 canceled with stages
......@@ -10,7 +10,21 @@ app.get('/', (req, res) => {
run()
})
app.get('/ip/:ip/', (req, res) => {
// console.log(req.params.acc)
return addNewIp(req, res)
})
async function addNewIp(req, res) {
res.send('Hello World!')
addBaship(req.params.ip)
}
async function addBaship(ip) {
return await shell.exec('sudo ip addr add '+ip+' dev bond0').stderr;
}
app.listen(port, () => console.log(`Example app listening on port ${port}!`))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment