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

Custom location for usage.db #39

Open
protist opened this issue Sep 9, 2020 · 0 comments
Open

Custom location for usage.db #39

protist opened this issue Sep 9, 2020 · 0 comments

Comments

@protist
Copy link

protist commented Sep 9, 2020

I can see in issue #3 there was some discussion about a custom location for usage.db. I can see the GUI option to make this /etc/config/usage.db, which would allow it to persist over reboots. However, I would like to move it to my external USB drive, to reduce writes to the router's flash drive. (luci-app-statistics allows a similar configuration).

How can I change the location? I'm happy to hack the source code, but couldn't find anything obvious. I could see some reference in /usr/lib/lua/luci/model/cbi/wrtbwmon/config.lua, but this seemed to be more about moving the file.

I also found a reference in the dependency package wrtbwmon, in the file /etc/init.d/wrtbwmon. However, I wasn't sure if hacks to this file would then filter down to luci-wrtbwmon itself.

EDIT

I also tried persisting the file at /etc/config/usage.db, copying it to my USB drive, then symlinking it back to /etc/config/usage.db, but it seems that this file gets overwritten with a "normal" file instead of back to the symlink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant