From 5f289995ba0047f5a46f4f07262943131997e2bd Mon Sep 17 00:00:00 2001 From: mollusk Date: Sun, 31 Oct 2021 21:35:49 -0700 Subject: [PATCH] svc.sh: check if arg 2 is present for up cmd --- svc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svc.sh b/svc.sh index 6d7e7a0..5a33404 100755 --- a/svc.sh +++ b/svc.sh @@ -133,7 +133,12 @@ systemd(){ echo ;; up) - systemctl --type=service --state=running + if [[ ! -z "${2}" ]];then + systemctl status "${2}" + else + systemctl --type=service --state=running + fi + ;; start)