You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
284 B

#!/usr/bin/sh
LAMPP='/opt/lampp/lampp'
STATUS=$($LAMPP status 2> /dev/null)
MYSQL=$(echo "$STATUS" | grep -i mysql | grep -io not > /dev/null && echo "down" || echo "up")
if [ "$MYSQL" = "up" ]; then
COLOUR="#00FF00"
else
COLOUR="#FF0000"
fi
echo "MySQL"
echo ""
echo "$COLOUR"