Last active
November 8, 2018 20:31
-
-
Save welingtonsampaio/25bb4c8bf77c584474494469cbf4c93a to your computer and use it in GitHub Desktop.
Kill mining files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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