add redis addr flag. (#236)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
304855c5a4
commit
276cb49ae4
6
main.go
6
main.go
|
@ -44,6 +44,7 @@ Server Options:
|
|||
--title <title> Notification title
|
||||
--proxy <proxy> Proxy URL (only for GCM)
|
||||
--pid <pid path> Process identifier path
|
||||
--redis-addr <redis addr> Redis addr (default: localhost:6379)
|
||||
iOS Options:
|
||||
-i, --key <file> certificate key file path
|
||||
-P, --password <password> certificate key password
|
||||
|
@ -119,6 +120,7 @@ func main() {
|
|||
flag.StringVar(&token, "token", "", "token string")
|
||||
flag.StringVar(&opts.Stat.Engine, "e", "", "store engine")
|
||||
flag.StringVar(&opts.Stat.Engine, "engine", "", "store engine")
|
||||
flag.StringVar(&opts.Stat.Redis.Addr, "redis-addr", "", "redis addr")
|
||||
flag.StringVar(&message, "m", "", "notification message")
|
||||
flag.StringVar(&message, "message", "", "notification message")
|
||||
flag.StringVar(&title, "title", "", "notification title")
|
||||
|
@ -175,6 +177,10 @@ func main() {
|
|||
gorush.PushConf.Stat.Engine = opts.Stat.Engine
|
||||
}
|
||||
|
||||
if opts.Stat.Redis.Addr != "" {
|
||||
gorush.PushConf.Stat.Redis.Addr = opts.Stat.Redis.Addr
|
||||
}
|
||||
|
||||
// overwrite server port
|
||||
if opts.Core.Port != "" {
|
||||
gorush.PushConf.Core.Port = opts.Core.Port
|
||||
|
|
Loading…
Reference in New Issue