mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-28 04:52:34 +02:00
Fix wifi disconnect
This commit is contained in:
parent
fb041990ae
commit
bdef32f0ce
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user