Created
August 5, 2019 22:49
-
-
Save bensig/9e82f9901c9cc90efab92bf948e5aaaa to your computer and use it in GitHub Desktop.
EOS nodeos stop script
This file contains hidden or 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
#!/bin/bash | |
NODEOS=/home/ubuntu/src/wax-blockchain/build/programs/nodeos/nodeos | |
DATADIR=/home/ubuntu/eos/wax/node | |
GENESIS=/home/ubuntu/eos/wax/genesis.json | |
if [ -f $DATADIR"/nodeos.pid" ]; then | |
pid=$(cat $DATADIR"/nodeos.pid") | |
echo $pid | |
kill $pid | |
rm -r $DATADIR"/nodeos.pid" | |
echo -ne "Stopping Nodeos" | |
while true; do | |
[ ! -d "/proc/$pid/fd" ] && break | |
echo -ne "." | |
sleep 1 | |
done | |
echo -ne "\rNodeos stopped. \n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pair with start script - https://gist.github.com/bensig/df6808ca78f59a75898bf49a08a7b326