Fix accidentally hardcoding the systemctl cat

This commit is contained in:
Salt 2021-08-18 19:52:33 -05:00
parent 39f9fa3dbb
commit 36e1bace98

View File

@ -37,7 +37,7 @@ else
;; ;;
3) 3)
# In this case, the unit is not running. Whether this is an issue depends on the type of service # 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" echo "UNIT OK - $service is type oneshot and not running"
exit 0 exit 0
else else