mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-28 04:52:34 +02:00
Fix wifi password with symbols
This commit is contained in:
parent
9853a8701f
commit
4a497ae183
@ -12,8 +12,8 @@ module.exports = ({ define }) => {
|
||||
|
||||
function wifiConnect(ssid, passphrase, errors) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let command = 'sudo nmcli dev wifi connect ' + ssid;
|
||||
if (passphrase) command += ' password ' + passphrase;
|
||||
let command = `sudo nmcli dev wifi connect '${ssid}'`;
|
||||
if (passphrase) command += ` password '${passphrase}'`;
|
||||
if (process.env.NODE_ENV !== 'production') command = 'sleep 2 && nmcli dev wifi connect ' + ssid;
|
||||
|
||||
exec(command, {}, (err, stdout) => {
|
||||
|
Loading…
Reference in New Issue
Block a user