Browse Source

fix: Terminate tail on exit (#1461)

Kroese 3 months ago
parent
commit
ccc0d4ea64
2 changed files with 4 additions and 4 deletions
  1. 1 1
      src/entry.sh
  2. 3 3
      src/samba.sh

+ 1 - 1
src/entry.sh

@@ -33,7 +33,7 @@ info "Booting ${APP}${BOOT_DESC} using QEMU v$version..."
 
 terminal
 ( sleep 30; boot ) &
-tail -fn +0 "$QEMU_LOG" 2>/dev/null &
+tail -fn +0 "$QEMU_LOG" --pid=$$ 2>/dev/null &
 cat "$QEMU_TERM" 2> /dev/null | tee "$QEMU_PTY" | \
 sed -u -e 's/\x1B\[[=0-9;]*[a-z]//gi' \
 -e 's/failed to load Boot/skipped Boot/g' \

+ 3 - 3
src/samba.sh

@@ -159,7 +159,7 @@ if ! smbd -l /var/log/samba; then
 fi
 
 if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then
-  tail -fn +0 /var/log/samba/log.smbd &
+  tail -fn +0 /var/log/samba/log.smbd --pid=$$ &
 fi
 
 case "${NETWORK,,}" in
@@ -180,7 +180,7 @@ if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then
   fi
 
   if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then
-    tail -fn +0 /var/log/samba/log.nmbd &
+    tail -fn +0 /var/log/samba/log.nmbd --pid=$$ &
   fi
 
 else
@@ -196,7 +196,7 @@ else
   fi
 
   if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then
-    tail -fn +0 /var/log/wsddn.log &
+    tail -fn +0 /var/log/wsddn.log --pid=$$ &
   fi
 
 fi