Skip to content

Instantly share code, notes, and snippets.

@scry3r
Created January 18, 2016 05:13
Show Gist options
  • Save scry3r/4bb27393f61555357815 to your computer and use it in GitHub Desktop.
Save scry3r/4bb27393f61555357815 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -eq 2 ]
then
proc=`pgrep $2`
if [ "${proc:-null}" = null ]; then
echo 'Process not running'
else
killall $2
fi
else
echo 'script you proccess_name'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment