v2ray / homebrew-v2ray

The homebrew tap for v2ray-core.
MIT License
436 stars 89 forks source link

fix configuration file path to a more rational one #6

Closed timqi closed 6 years ago

timqi commented 6 years ago

fix #5

timqi commented 6 years ago

seems no response when parse download url in checker.sh of travis-ci @Doublemine

Doublemine commented 6 years ago

@timqi Thanks for PR, #5 point to the conf file location can be confusion. I think migrate conf file to new dir may be better choice. Such as /usr/local/etc/v2ray/config.json. And what's your suggestions?

Doublemine commented 6 years ago

Pls update readme.md as well, Thx.

Doublemine commented 6 years ago

@timqi When i test this pr, it will cause the error: Error: No such file or directory - v2ray/config.json. And i guess below code may cause some error:

etc.install "v2ray/config.json"

Had you tested it ?

timqi commented 6 years ago

Sorry for that I don't know how does etc.install work. It may cuz v2ray directory in etc path doesn't created before. Please help handling this at your ease.

Doublemine commented 6 years ago

Maybe i guess you can try this:

def install
    bin.install "v2ray"
    bin.install "v2ctl"
    bin.install "geoip.dat"
    bin.install "geosite.dat"
    (etc/"v2ray").mkpath
    etc.install "config.json" => "v2ray/config.json"
 end

And do some improve, i have not verified whether it is work, so you should test it on your mac env.