Skip to content

Commit 1b1c766

Browse files
committed
ddns-scripts: fix luci XHR timeout when restarting ddns service
Redirect stdout and stderr to /dev/null when starting/restarting the ddns service in the background. Without this redirection, file descriptors are inherited by the child process, preventing proper process detachment and causing luci's XHR requests to timeout. Signed-off-by: Juan Antonio <[email protected]>
1 parent ffa24c1 commit 1b1c766

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_lucihelper.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ case "$1" in
149149
start)
150150
[ -z "$SECTION" ] && usage_err "command 'start': 'SECTION' not set"
151151
if [ "$VERBOSE" -eq 0 ]; then # start in background
152-
"$DDNSPRG" -v 0 -S "$SECTION" -- start &
152+
("$DDNSPRG" -v 0 -S "$SECTION" -- start >/dev/null 2>&1 &)
153153
else
154154
"$DDNSPRG" -v "$VERBOSE" -S "$SECTION" -- start
155155
fi
@@ -160,7 +160,7 @@ case "$1" in
160160
restart)
161161
"$DDNSPRG" -- stop
162162
sleep 1
163-
"$DDNSPRG" -- start
163+
"$DDNSPRG" -- start >/dev/null 2>&1
164164
;;
165165
stop)
166166
if [ -n "$SECTION" ]; then

0 commit comments

Comments
 (0)