aboutsummaryrefslogtreecommitdiff
path: root/nscaw
diff options
context:
space:
mode:
Diffstat (limited to 'nscaw')
-rwxr-xr-xnscaw13
1 files changed, 4 insertions, 9 deletions
diff --git a/nscaw b/nscaw
index d2ed64d..ca97bac 100755
--- a/nscaw
+++ b/nscaw
@@ -67,18 +67,13 @@ time=${time//$'\t'/ } # Change all tabs to spaces
case $ret in
0)
code=0 # OK
- message=$(printf '%s: `%s` ran with no errors as user %s: %s' \
- "$self" "$*" "$username" "$time")
- ;;
- 127)
- code=3 # UNKNOWN
- message=$(printf '%s: `%s` could not be found as user %s with PATH=%s' \
- "$self" "$1" "$username" "$PATH")
+ message=$(printf '%s: `%s` succeeded: %s' \
+ "$self" "$*" "$time")
;;
*)
code=2 # CRITICAL
- message=$(printf '%s: `%s` ran with errors as user %s: %s' \
- "$self" "$*" "$username" "$time")
+ message=$(printf '%s: `%s` failed (exit %d), USER %s, PATH=%s: %s' \
+ "$self" "$*" "$ret" "$username" "$PATH" "$time")
;;
esac