File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments