Created
May 20, 2018 19:38
-
-
Save rlaace423/15c337fe6db3d63bbbc9d00ca35140a5 to your computer and use it in GitHub Desktop.
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
#!/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