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
Allow the Peershares daemon to create a customizable peershares.conf file, if one is not already included #76
Comments
I don't think the daemon should do anything interactive. A daemon is meant to be run without any user interface. |
I agree that the daemon is intended to be run without any user interface, once it has been configured the first time. I'd be happy if the daemon, when it could not find what it was looking for, was allowed to create the required peershares.conf file with the most basic set of parameters required to start. This follows the existing pattern for creating a .peershares directory (and it's associated content) if it does not yet exist. # Parameters passed to the Peershares daemon (peersharesd)
server=1
listen=1
port={{peershares default port}}
rpcuser={{randomly generated}}
rpcpassword={{randomly generated}}
rpcport={{peershares default rpcport}}
# To learn more about the configuration options available to use in this file,
# please visit https://peershares.net/developers/daemon.html That way, the file is ready when the daemon starts up, and the user won't have to manually intervene unless they want to make changes. |
I'm not sure about I think the same applies to I think the ports should not be set either because it changes the default behavior. If you don't define the ports, the default is different whether you're on mainnet or on testnet. If you define it, you'll always use the same ports. I think it adds a risk of sending commands to the wrong server. I agree on random user and password. It'd be a nice not to have to choose them. But I'm not so sure if it's the only thing we do. Maybe we should only do it when the daemon is started instead of displaying the error message you mentioned. |
That's definitely reasonable.
|
You don't even need
Yes it uses the ports defined here: https://github.com/Peershares/Peershares/blob/master/src/protocol.h#L18
|
Update of Norwegian (Bokmål) translation
Added functional tests
It would improve the experience if, when the Peershares daemon is launched, it would not just detect if the peershares.conf file exists in the data directory, but would then allow the user to create a customizable one.
Currently, the process works like this:
peersharesd -daemon
is started from the command line, it will check to make sure that a valid peershares.conf file is in the correct data directory.Initially, the scope of this enhancement could be very simple:
FuzzyBear had created a bash script (or modified an existing one, I'm not sure where it originally came from) that creates a .conf file. Perhaps this would be a starting point for integration:
The text was updated successfully, but these errors were encountered: