Skip to content

Instantly share code, notes, and snippets.

@tuxracer
Last active December 28, 2016 22:00
Show Gist options
  • Save tuxracer/fda03fc5bdb0e5c3e57cc03a487f49b4 to your computer and use it in GitHub Desktop.
Save tuxracer/fda03fc5bdb0e5c3e57cc03a487f49b4 to your computer and use it in GitHub Desktop.
#!/bin/bash
export PATH=/usr/local/bin:$PATH
if control status | grep -q www2; then
color="green"
else
color="red"
fi
echo "Setting color to: $color"
echo -n $color | nc -4u -w0 localhost 1738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment