ipfs daemon already running. EVERYTHING OK!
This commit is contained in:
parent
bb9ee1254d
commit
b48e43cf94
|
@ -4,17 +4,17 @@
|
|||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
|
||||
# CHECK if daemon is already running
|
||||
[[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) ]] \
|
||||
&& echo "ipfs daemon already running. EVERYTHING OK!" && ipfs id && exit 0
|
||||
|
||||
# CHECK not root user !!
|
||||
if [ "$EUID" -eq 0 ]
|
||||
then echo -e "${c_red}DO NOT EXECUTE AS root. Choose a user for your Astroport Station (we like pi)$c_"
|
||||
exit 1
|
||||
else echo -e "${c_yellow}OK $USER, let's go!$c_";
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[[ -d ~/.ipfs ]] && echo "IPFS install exist, please remove backup before execute this script" && exit 1
|
||||
|
||||
echo -e "${c_yellow}Onboarding IPFS...$c_"
|
||||
|
|
Loading…
Reference in New Issue