From a85000ca3f0cbfb4e291363cbb35fb9b7b32bae2 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Wed, 12 Nov 2025 00:00:41 -0500
Subject: linhes-system: empty_storage_groups.py: exit when isBusy

---
 linhes/linhes-system/PKGBUILD                | 4 ++--
 linhes/linhes-system/empty_storage_groups.py | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD
index 95fa5aa..6a61b2c 100755
--- a/linhes/linhes-system/PKGBUILD
+++ b/linhes/linhes-system/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=linhes-system
 pkgver=9.0.0
-pkgrel=98
+pkgrel=99
 arch=('x86_64')
 #install=$pkgname.install
 pkgdesc="Everything that makes LinHES a system"
@@ -29,7 +29,7 @@ source=($binfiles
     'lh_system_start.sh.desktop' 'rc6_mce.toml' 'recordings.cron' 'rsyslog.mythtv.conf')
 sha256sums=('1fb11c7f472df9e3066866301962c2678b80c2fbd988dc34db022d51e1101a42'
             '8ae6de3d0ff8e777aeea56f74f38676080142148ac3a32f828462d85c39e7cf7'
-            '3f67269c30e8f86169fcde49a8e57e0ce9388fb1c963e2bdf1dad20be4bc041f'
+            '79a3fe8622dbc5351316c0e36c26f8443334fcf8eea324cf0a0efe0e4c2c1a93'
             'ff261f41efec8a9963f9f59100cbe75f015028a2ed3a863ce0cb473f2ebb7b76'
             '8b54c31b8efde3917f603c5307bebb0a2a00239ad9a983c2f5d8120003256449'
             'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27'
diff --git a/linhes/linhes-system/empty_storage_groups.py b/linhes/linhes-system/empty_storage_groups.py
index 1fc4208..c36437e 100755
--- a/linhes/linhes-system/empty_storage_groups.py
+++ b/linhes/linhes-system/empty_storage_groups.py
@@ -24,6 +24,8 @@ def sizeof_fmt(num, suffix='B'):
     return "%.1f %s%s" % (num, 'Yi', suffix)
 
 def signal_handler(signal, frame):
+    if isBusy:
+        sys.exit(0)
     print("\nWill quit when file has been moved.\nMoving File...")
     global shouldQuit
     shouldQuit = True
@@ -163,6 +165,7 @@ if __name__ == '__main__':
             print("Check Only option was used. No files were moved.")
             shouldQuit = True
         else:
+            global isBusy
             isBusy = True
             while isBusy:
                 if shouldQuit:
-- 
cgit v0.12

