From 36e1bace98e52db5e7ebebc957c0c7cc6263ae07 Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Wed, 18 Aug 2021 19:52:33 -0500
Subject: [PATCH] Fix accidentally hardcoding the systemctl cat

---
 check_systemd_unit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_systemd_unit b/check_systemd_unit
index 74844ea..85a108a 100755
--- a/check_systemd_unit
+++ b/check_systemd_unit
@@ -37,7 +37,7 @@ else
 			;;
 		3)
 			# In this case, the unit is not running. Whether this is an issue depends on the type of service
-			if systemctl cat backup | grep -ie '^Type=' | grep -ie 'oneshot' > /dev/null 2>&1; then
+			if systemctl cat "$service" | grep -ie '^Type=' | grep -ie 'oneshot' > /dev/null 2>&1; then
 				echo "UNIT OK - $service is type oneshot and not running"
 				exit 0
 			else