Skip to content

Commit 1f21503

Browse files
committed
Fix DDNS message
Signed-off-by: Jason Pavlakis <jasonpavlakis@gmail.com>
1 parent cf10d83 commit 1f21503

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

BackEnd/utils/DNS/ddnsConfig.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,13 @@ async function handleDdnsService(requestData){
135135
let currentDdnsConfigs = getDDnsConfigs()
136136

137137
if (requestData['ddns_enabled'] === 'true' && currentDdnsConfigs['ddns_enabled'] === '1'){
138-
await executeCommand('sudo systemctl restart ddclient')
138+
return await executeCommand('sudo systemctl restart ddclient')
139139
} else if (requestData['ddns_enabled'] === 'true' && currentDdnsConfigs['ddns_enabled'] === '0') {
140-
await executeCommand('sudo systemctl enable ddclinet')
141-
await executeCommand('sudo systemctl start ddclient')
140+
return await executeCommand('sudo systemctl enable ddclinet && sudo systemctl start ddclient')
142141
} else if (requestData['ddns_enabled'] === 'false' && currentDdnsConfigs['ddns_enabled'] === '1') {
143-
await executeCommand('sudo systemctl disable ddclinet')
144-
await executeCommand('sudo systemctl stop ddclient')
142+
return await executeCommand('sudo systemctl disable ddclinet && sudo systemctl stop ddclient')
145143
} else if (requestData['ddns_enabled'] === 'false' && currentDdnsConfigs['ddns_enabled'] === '0'){
146-
await executeCommand('sudo systemctl stop ddclient')
144+
return await executeCommand('sudo systemctl stop ddclient')
147145
}
148146
}
149147

0 commit comments

Comments
 (0)