diff --git a/check_systemd_service.sh b/check_systemd_service.sh index a5b810f..052749e 100755 --- a/check_systemd_service.sh +++ b/check_systemd_service.sh @@ -12,7 +12,7 @@ IS_TIMER=false IS_ALLOWED_DISABLED=false # Parse command line arguments -while getopts "u:t" opt; do +while getopts "u:t:d" opt; do case ${opt} in u ) UNIT_NAME=$OPTARG @@ -20,11 +20,11 @@ while getopts "u:t" opt; do t ) IS_TIMER=true ;; - t ) + d ) IS_ALLOWED_DISABLED=true ;; \? ) - echo "Invalid option: $OPTARG" 1>&2 + usage exit 1 ;; : )