dtolabs / yana2

Yet Another Node Authority ... because you wanted an agile Real-Time Service Model (RTSM)
8 stars 1 forks source link

config.properties should be loaded from a location defined in system properties #137

Closed sharadr closed 12 years ago

sharadr commented 12 years ago

Location of config.properties is set to $HOME/.yana/config.properties.

This must be allowed to override by providing a location passed as -D params to the system. e.g -Dconfig.location=/path/to/config.properties.

The support for this is already present in Config.groovy but need to be uncommented and tested. // locations to search for config files that get merged into the main config // config files can either be Java properties files or ConfigSlurper scripts

/* grails.config.locations = [ "classpath:${appName}-config.properties", "classpath:${appName}-config.groovy", "file:${userHome}/.grails/${appName}-config.properties", "file:${userHome}/.grails/${appName}-config.groovy"]

if(System.properties["${appName}.config.location"]) { grails.config.locations << "file:" + System.properties["${appName}.config.location"] }

*/

orubel commented 12 years ago

Good catch. Sorry I missed this.