pschmitt / pia-tools

Shell script to automate privateinternetaccess port forwarding and starting/stopping transmission when connected/disconnected and other stuff
https://aur.archlinux.org/packages/pia-tools
GNU General Public License v3.0
132 stars 23 forks source link

Use current user's $HOME for Default Transmission Config Path #24

Closed noctuid closed 9 years ago

noctuid commented 9 years ago

This uses logname and eval echo for tilde expansion (since run as super user).

noctuid commented 9 years ago

@pschmitt This does not actually use $HOME. It determines the user's home directory with logname and tilde expansion. It will only give /root/.config if the user has actually logged in on the tty as root (it will still work with su), and in that case that would be the right location. The default transmission config does not use XDG_CONFIG_DIR to my knowledge (see the here), it uses $HOME/.config. If XDG_CONFIG_DIR is unset, that would not work.

Will you consider re-opening this?