12 lines
328 B
Bash
Executable file
12 lines
328 B
Bash
Executable file
#!/bin/bash
|
|
|
|
THIS_FILE=${0}
|
|
SLACK_NOTIFIER="/home/thomas/repos/utilities/slack_notifier.sh"
|
|
COMMAND=$(ls /nonexisting_dir 2>&1 1>/dev/null)
|
|
#COMMAND=$(ls . 2>&1 1>/dev/null)
|
|
|
|
if ! $COMMAND; then
|
|
$SLACK_NOTIFIER "test" "error" "Something went wrong" "$COMMAND" "$THIS_FILE"
|
|
else
|
|
$SLACK_NOTIFIER "test" "success" "All good!"
|
|
fi
|