Skip to content

Instantly share code, notes, and snippets.

@welingtonsampaio
Last active November 8, 2018 20:31
Show Gist options
  • Save welingtonsampaio/25bb4c8bf77c584474494469cbf4c93a to your computer and use it in GitHub Desktop.
Save welingtonsampaio/25bb4c8bf77c584474494469cbf4c93a to your computer and use it in GitHub Desktop.
Kill mining files
programs="crypto-pool nanopool supportxmr minexmr dwarfpool xmrpool moneropool xmr monero udevs udevd docker hashvault moneroocean evolutions littletrump jboss nanoWatch"
for i in ${programs}; do
unset $pid
pid=`ps -ef | grep $i | grep -v grep | awk '{print $1}'`
if [ ! -z $pid ]; then
kill -9 $pid
if [ -x skill ]; then
skill -KILL $i
fi
if [ -x killall ]; then
killall $i
fi
rm -f /tmp/$i
echo "Kill $i($pid)"
fi
done
rm -f /tmp/kuber.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment