Skip to content
Snippets Groups Projects
Commit b5583dce authored by nimrod's avatar nimrod
Browse files

Return exit code from monitor.

parent 34fd0b24
Branches
Tags
No related merge requests found
...@@ -109,12 +109,15 @@ alias detectproxy='lynx http://detectportal.firefox.com/success.txt' ...@@ -109,12 +109,15 @@ alias detectproxy='lynx http://detectportal.firefox.com/success.txt'
alias color='less --raw-control-chars -p' alias color='less --raw-control-chars -p'
monitor () { monitor () {
if eval "$@" eval "$@"
code="$?"
if [ "$code" -eq 0 ]
then then
notify-send "$(basename "${1#__}") has finished." notify-send "$(basename "${1#__}") has finished."
else else
notify-send --urgency=critical "$(basename "${1#__}") has failed." notify-send --urgency=critical "$(basename "${1#__}") has failed."
fi fi
return "$code"
} }
jt () { jt () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment