I’d like to do the initial snap install
and snap set
of a bunch of arguments at the same time, so that the configuration file is in place and reflects the configuration changes prior to starting the daemon for the first time.
Right now the following would happen for me:
$ snap set mysnap key=value
error: snap "mysnap" not found
$ snap install mysnap
(daemon start repeatedly fails because the default configuration needs modification)
(OR the use of default configuration doxes the service to the outside world)
$ snap set mysnap key=value
(configure hook generates the config file)
(daemon is restarted)
(daemon runs the way it was intended)
I think the install command should take optionally some name=value arguments to specify the initial configuration. It is not reasonable to expect every snap to work out of the box with a default configuration.
Consider my use case where I want bitcoind to run in onion-only mode, and the proxy port is not the standard port. I need to override quite a few parameters, and i don’t want the bitcoind daemon to be started even once with the default (empty) configuration, since doing so would expose my node as a bitcoind node through the network traffic it generates.
I envision something like
snap install bitcoind \
dns=0 \
dnsseed=0 \
onlynet=onion \
proxy=127.0.0.1:xyz
Thoughts?