Skip to content

Commit

Permalink
Fail if -i arg is not .service
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Jul 16, 2024
1 parent 8e71484 commit a59e593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/checkservices
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ usage() {
echo " -s/-S: display (or not) status of restarted service (default: $STATUS)" >&2
echo " -u/-U: act (or not) on services in users slice (default: $USER_SLICE)" >&2
echo " -z/-Z: serialize (or not) action (default: $SERIALIZE)" >&2
echo " -i 'service_name'.service: list of services to ignore (space separated)" >&2
echo " -i 'service_name'.service: ignore a specific service (can be used multiple times)" >&2
exit 2
}

Expand All @@ -272,6 +272,8 @@ argparse() {
Z) SERIALIZE=0;; z) SERIALIZE=1;;
i) if [[ "$OPTARG" == *.service ]]; then
IGNORED_SERVICES+=("$OPTARG")
else
usage
fi
;;
*) usage;;
Expand Down

0 comments on commit a59e593

Please sign in to comment.