Commit 4cbd53e9 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 2206fc2d
...@@ -18,11 +18,12 @@ app.get('/ip/:ip/', (req, res) => { ...@@ -18,11 +18,12 @@ app.get('/ip/:ip/', (req, res) => {
async function addNewIp(req, res) { async function addNewIp(req, res) {
res.send('Hello World!') res.send('Hello World!')
console.log(req.params.ip)
addBaship(req.params.ip) addBaship(req.params.ip)
} }
async function addBaship(ip) { async function addBaship(ip) {
return await shell.exec('sudo ip addr add '+ip+' dev bond0').stderr; return await shell.exec(' ip addr add '+ip+' dev bond0').stderr;
} }
......
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