From f03e1daf9f925fd814737aa9dad45211072641ca Mon Sep 17 00:00:00 2001 From: Ben de Roo Date: Tue, 24 Mar 2026 19:31:45 +0100 Subject: [PATCH] Update src/killsw --- src/killsw | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/killsw b/src/killsw index f5c69c5..f25b449 100644 --- a/src/killsw +++ b/src/killsw @@ -17,10 +17,10 @@ case "$cmd" in systemctl status killswitch.target ;; add) - if [[ "$3" == "to" && "$4" == "group" && -n "$5" ]]; then - echo "Called add $2 to group $5" + if [[ -n "$2" && "$3" == "to" && -n "$5" ]]; then + echo "Called add $2 to $5" else - echo "Usage: killsw add [service] to group [name]" + echo "Usage: killsw add [service] to [group]" fi ;; help|-h|--help) @@ -34,7 +34,7 @@ COMMANDS: stop Stop all services linked to killswitch.target start Start all services linked to killswitch.target status Show the current status of the killswitch target - add [service] to group [name] adds services to different groups. (not doing anything at the moment) + add [service] to [name] adds services to different groups. (not doing anything at the moment) -h, --help Show this help message -v, --version Show version information