Permalink
Browse files

Add Webhook to Warning Light

  • Loading branch information...
NEMS Linux
NEMS Linux committed Dec 19, 2018
1 parent b296756 commit 8d87ab99a28edbf172402a8c4d2842075c419178
Showing with 11 additions and 0 deletions.
  1. +11 −0 info.sh
11 info.sh
@@ -321,6 +321,17 @@ elif [[ $COMMAND == "cloudauth" ]]; then
echo 0
fi

elif [[ $COMMAND == "webhook" ]]; then
# From nems.conf
if [[ -f /usr/local/share/nems/nems.conf ]]; then
if grep -q "webhook" /usr/local/share/nems/nems.conf; then
webhook=`cat /usr/local/share/nems/nems.conf | grep webhook | printf '%s ' $(cut -n -d '=' -f 2)`
fi
# Remove carriage return, and trim
webhook=$(echo "$webhook" | tr '\n' ' ' | xargs)
fi
echo $webhook

# Output usage info as no valid command line argument was provided
else
echo "Usage: ./$me command"

0 comments on commit 8d87ab9

Please sign in to comment.