ZeroNet
ZeroNet copied to clipboard
feature: launch namecoin
Intent
Launch a Namecoin client such as Namecoin Core if it's installed when Zeronet launches.
NamecoinUtils.py give a set of functions.
- is_namecoin_installed check if a .namecoin folder exists in the (linux) user directory.
- is_namecoin_running check if a running process contain the string namecoin.
- check_namecoin_rpc_conf ensures that the necessary variables are set.
- start_namecoin execute a subprocess of namecoind
- kill_namecoin kill the given pid process
Add del function to SiteManagerPlugin.py
- del function kill the Namecoin client if it was launched by ZeroNet on ZeroNet shuts down.
Process
- self.config is initiated with CLI args, if provided
- is namecoin installed ?
- is namecoin running ?
- if conf is not set, check for namecoin rpc conf in namecoin.conf
- if there is no namecoin.conf raise missing parameters error.
- if conf is not set, check for namecoin rpc conf in namecoin.conf
- start namecoind (if path is given)
- is namecoin running ?
Limitations
For the time being, it only works on linux, we can upgrade it for windows and macos users later
Nota bene
I pushed with debug logs to make it easier for you to test, i will remove them before merging, if you agree