diff --git a/main.go b/main.go
index 3897aa9..8dcd7ed 100644
--- a/main.go
+++ b/main.go
@@ -44,6 +44,7 @@ Server Options:
--title
Notification title
--proxy Proxy URL (only for GCM)
--pid Process identifier path
+ --redis-addr Redis addr (default: localhost:6379)
iOS Options:
-i, --key certificate key file path
-P, --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