Skip to content

Commit

Permalink
Network: Add sudo to nmcli connection up
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade authored Mar 5, 2024
1 parent c311402 commit 1564a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/networkManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function setWirelessStatus (status, callback) {
function activateConnection (conName, callback) {
// activate the connection (by id)
// assumed that conName is a valid UUID
exec('nmcli connection mod ' + conName + ' connection.autoconnect yes ' + ' && ' + 'nmcli connection up ' + conName, (error, stdout, stderr) => {
exec('nmcli connection mod ' + conName + ' connection.autoconnect yes ' + ' && ' + 'sudo nmcli connection up ' + conName, (error, stdout, stderr) => {
if (stderr) {
console.error(`exec error: ${error}`)
winston.error('Error in getAdapters() ', { message: stderr })
Expand Down

0 comments on commit 1564a64

Please sign in to comment.