Fix wifi disconnect

This commit is contained in:
Michele Marcucci 2023-05-04 08:41:58 +02:00
parent fb041990ae
commit bdef32f0ce

View File

@ -11,7 +11,7 @@ module.exports = ({ define }) => {
function wifiDisconnect(ssid, passphrase, errors) {
return new Promise((resolve, reject) => {
let command = 'for i in $(nmcli -t -f uuid c show); do nmcli c delete $i; done';
let command = 'for i in $(nmcli -t c show|grep wlan); do nmcli c delete `echo $i|cut -d":" -f2`; done';
if (process.env.NODE_ENV !== 'production') command = 'sleep 2 && echo true';
exec(command, {}, (err, stdout) => {