Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ipfs and tee launch bugs #16

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ you will see a warning like:

Need to make sure your tee has plotted your empty disk and reported your first work report.

- Waiting one era

- Click "Validate" button, like:
![set session key](doc/img/start_validate.PNG)

Expand Down
13 changes: 9 additions & 4 deletions stcript/crust-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,13 @@ ipfsLaunch()
eval $cmd_run
else
nohup $cmd_run &>$2 &
ipfs_pid=$(ps -ef | grep "$cmd_run" | grep -v grep | awk '{print $2}')
sleep 5
ipfs_pid_str=$(netstat -ntulp | grep $api_port)
ipfs_pid_str=${ipfs_pid_str[0]#tcp 0 0 0.0.0.0:$api_port 0.0.0.0:* LISTEN }
ipfs_pid_str=${ipfs_pid_str[0]/\/ipfs/}
ipfs_pid=$(echo $ipfs_pid_str)
mv $2 $2.$ipfs_pid
verbose INFO "Launch ipfs in backend (pid is $ipfs_pid), log information will be saved in $2.$ipfs_pid . If ipfs launch failed, please check the port usage, old ipfs may be running.\n"
verbose INFO "Launch ipfs in backend (pid is $ipfs_pid), log information will be saved in '$2.$ipfs_pid'. If ipfs launch failed, please check the port usage, old ipfs may be running.\n"
fi
}

Expand Down Expand Up @@ -567,9 +571,10 @@ teeLaunch()
eval $cmd_run
else
nohup $cmd_run &>$2 &
sleep 3
tee_pid=$(ps -ef | grep "$cmd_run" | grep -v grep | awk '{print $2}')
mv $2 $2.$tee_pid
verbose INFO "Launch tee with $1 configurations in backend (pid is $tee_pid), log information will be saved in $2.$tee_pid\n"
mv $2 $2.${tee_pid[0]: 0: 5}
verbose INFO "Launch tee with $1 configurations in backend (pid is $tee_pid), log information will be saved in $2.${tee_pid[0]: 0: 5}\n"
fi
}

Expand Down