Skip to content

Instantly share code, notes, and snippets.

@debbbbie
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debbbbie/f7b3001aa593bd625fbd to your computer and use it in GitHub Desktop.
Save debbbbie/f7b3001aa593bd625fbd to your computer and use it in GitHub Desktop.
status_check_shell
prog_stats memcached
prog_stats mysqld
function prog_stats(){
if `ps awx|grep -v grep |grep -q $1` ; then
printf "\033[0;32mRunning"
return 0
else
printf "\033[0;31mDead"
return -1
fi
}
prog_stats redis-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment