Skip to content

Instantly share code, notes, and snippets.

@rlaace423
Created May 20, 2018 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlaace423/15c337fe6db3d63bbbc9d00ca35140a5 to your computer and use it in GitHub Desktop.
Save rlaace423/15c337fe6db3d63bbbc9d00ca35140a5 to your computer and use it in GitHub Desktop.
#!/bin/bash
NODEOS_ROOT_DIR=/root/eos_data/nodeos
CONFIG_DIR=/root/eos_data/nodeos/config
DATA_DIR=/root/eos_data/nodeos/data
LOG_DIR=/root/eos_data/nodeos/log
## WALLET DIR 은 config.ini 파일 안의 datadir 로 정의!!!
## plugin들도 config.ini 파일 안에 정의!!!
## server address 도 config.ini 파일 안에 정의!!!
CURTIME=$(date +"%Y-%m-%d_%T")
LOG_FILENAME=$CURTIME".log"
PRODUCER_NAME=eosio
PROCESS_COUNT=$(ps -ef | grep nodeos | grep -v grep | awk '{print $2}' | wc -l)
if [ $PROCESS_COUNT -eq 0 ]; then
printf "실행 중인 nodeos가 없습니다.\n"
exit 1
fi
printf "GOD EOS 데몬을 종료 중...\n"
ps -ef | grep nodeos | grep -v grep | awk '{print $2}' | xargs kill -9
sleep 1s
PROCESS_COUNT=$(ps -ef | grep nodeos | grep -v grep | awk '{print $2}' | wc -l)
if [ $PROCESS_COUNT -ne 0 ]; then
printf "아직 실행 중인 nodeos가 존재합니다."
echo
exit 1
fi
printf "GOD EOS 데몬 종료됨.\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment