node-wifi
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "node-wifi", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "NodeJS tool to manage wifi", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -9,10 +9,10 @@ var exec = require('child_process').exec; | ||
var new_env = util._extend(process.env, { LANG: "en"}); | ||
var iface = 'en0'; | ||
var commandStr = "networksetup -setairportnetwork "; | ||
if (config.iface) { | ||
commandStr += config.iface.toString() + " '" + | ||
ap.ssid + "' '" + ap.password + "'"; | ||
} else { | ||
commandStr += "'en0' '" + ap.ssid + "' '" + ap.password; | ||
iface = config.iface.toString(); | ||
} | ||
commandStr = commandStr + "'" + iface + "'" + " " + "'" + ap.ssid + "'" + " " + "'" + ap.password + "'"; | ||
console.log(commandStr); | ||
@@ -19,0 +19,0 @@ exec(commandStr, new_env, function(err, resp) { |
50681