Phala-Network / solo-mining-scripts

Apache License 2.0
32 stars 26 forks source link

Improve readme.md #39

Closed h4x3rotab closed 2 years ago

h4x3rotab commented 2 years ago
  1. Use rm -rf ... instead of echo yes | rm -r ...
  2. Specify the full path in deleting script section (should we use sudo rm -rf $HOME/solo-mining-scripts-main?)
  3. Deleting the database
    • To delete Khala, just run rm -rf /var/khala-dev-node/chains/khala. No need to delete the three directories separately
    • Add: to delete Kusama blockchain ,run rm -rf /var/khala-dev-node/chains/polkadot
hauni97 commented 2 years ago

@h4x3rotab
Done! See here: https://github.com/Phala-Network/solo-mining-scripts/commit/72777a5540a3560b95491e893c949f4671169b1c

However sudo rm -rf $HOME/solo-mining-scripts-main does not work if home is /root.

Here my suggested solution:

home_path=eval echo ~$USER
$home_path
sudo rm -rf sudo rm -rf
h4x3rotab commented 2 years ago

I didn't understand. If you are already log on as root, you can right execute rm -rf $HOME/solo-mining-scripts-main

If you are in another user, you need to switch to root anyway. Then you can run something like sudo rm -rf /root/solo-mining-scripts-main.

The above code is really weird. What's sudo rm -rf sudo rm -rf? Are you going to remove a file called "sudo" under the current directory?

h4x3rotab commented 2 years ago

Also, we have to ensure all the code change is reviewed. Do not commit directly to the main branch.

hauni97 commented 2 years ago

Yes, indeed. This is obviously wrong what was committed. It was supposed to be:

home_path=`eval echo ~$USER`
$home_path
sudo rm -rf /$home_path/solo-mining-scripts-main

However, I'd suggest to edit to:

To find your home directory where solo-mining-scripts-main should reside execute:

eval echo ~$USER

To then delete it execute:

sudo rm -rf /insert_your_path_from_previous_command/solo-mining-scripts-main
hauni97 commented 2 years ago

@h4x3rotab can we close this issue?

h4x3rotab commented 2 years ago

OK. Sounds good