Skip to content

Instantly share code, notes, and snippets.

@bse666
Last active August 29, 2015 14:18
Show Gist options
  • Save bse666/533da2c0b288e5a1f958 to your computer and use it in GitHub Desktop.
Save bse666/533da2c0b288e5a1f958 to your computer and use it in GitHub Desktop.
check-process-running
# by: http://stackoverflow.com/questions/2903354/bash-script-to-check-running-process
pgrep procname && echo Running
pgrep procname || echo Not running
killall -q -0 procname && echo Running
pidof procname && echo Running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment