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

Blocky commands do not run without local ./config.yml file #147

Closed
schlamar opened this issue Feb 26, 2021 · 1 comment
Closed

Blocky commands do not run without local ./config.yml file #147

schlamar opened this issue Feb 26, 2021 · 1 comment
Labels
🔨 enhancement New feature or request
Milestone

Comments

@schlamar
Copy link
Contributor

I would expect that blocky commands like "blocky query" or "blocky blocking status" are using the HTTP API and require only the argument apiPort to work (and apiHost if it isn't running on localhost).

However, running a blocky command without a local ./config.yml file fails:

$ blocky --apiPort=4000 blocking status
FATA[0000] Can't read config file: open ./config.yml: no such file or directory

Additionally, I would suggest that you introduce a default API port so that blocky commands can run without any configuration argument for default installs.

I have installed blocky by FHS rules (/usr/local/bin/blocky, /etc/blocky/config.yml, /var/log/blocky/*.log) and using blocky in the shell is really cumbersome in this case.

@0xERR0R 0xERR0R added the 🔨 enhancement New feature or request label Feb 26, 2021
@0xERR0R 0xERR0R added this to the 0.13 milestone Feb 26, 2021
@0xERR0R
Copy link
Owner

0xERR0R commented Feb 26, 2021

Yes, It makes sense. I changed the logic: config file is only for "server mode" mandatory. Other CLI commands will use port from config file only if the config file exist, otherwise only parameters from command line. Default host is localhost, default port is 4000 now.
If you use port 4000, you can just call blocky blocking status without other parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants