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

Not reading wol_config.ini file. #7

Closed
vdbpeter opened this issue Mar 8, 2021 · 3 comments · Fixed by #10
Closed

Not reading wol_config.ini file. #7

vdbpeter opened this issue Mar 8, 2021 · 3 comments · Fixed by #10

Comments

@vdbpeter
Copy link

vdbpeter commented Mar 8, 2021

Hi guys- cute script- thanks!
Just pointing out that in your code in line 66 you're referencing Config.read(mydir+"/.wol_config.ini") but wol_config.ini should not be a hidden file.

Cheers

@bentasker
Copy link
Owner

It was thrown together ages ago for this - https://www.bentasker.co.uk/documentation/linux/258-usurping-the-bthomehub-with-a-raspberry-pi-part-three-routing-remote-administration-and-utilities

The intention, originally had been to move the config file to the users home dir (which is why it's a hidden file), although of course really by today's standards it should go into ~/.config or somewhere.

Feel free to open a pull updating the location

@jNullj
Copy link
Contributor

jNullj commented Aug 21, 2021

I don't mind making a pull request. I suggest using the XDG specs. Which state:

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

A user-specific version of the configuration file may be created in $XDG_CONFIG_HOME/subdir/filename, taking into account the default value for $XDG_CONFIG_HOME if $XDG_CONFIG_HOME is not set.

I think a proper subdir name would be bentasker.Wake-On-Lan-Python. Let me know if that sounds good and i will make the changes.

@bentasker
Copy link
Owner

Sounds good to me, please go for it.

I've a busy weekend, so likely won't merge until in the week

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

Successfully merging a pull request may close this issue.

3 participants