shlist

share and manage lists between multiple people
Log | Files | Refs

commit 9f0389d0970a644cb1b7fad044491c0210a940d0
parent be4bb49c00b1ab6ff60851d04128a47738b20f84
Author: Kyle Milz <kyle@0x30.net>
Date:   Tue, 23 Feb 2016 20:04:53 -0700

apnd: add -p argument

Diffstat:
Mapnd/apnd.go | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/apnd/apnd.go b/apnd/apnd.go @@ -5,6 +5,7 @@ import ( "crypto/tls" //"crypto/x509" "encoding/json" + "flag" "fmt" "log" "net/http" @@ -118,6 +119,9 @@ func process_client(c net.Conn, h http.Client) { } func main() { + var sock_path = flag.String("p", "../apnd.socket", "path to control socket") + flag.Parse() + // These keys are provided by Apple through their Developer program cert, err := tls.LoadX509KeyPair("certs/aps.pem", "certs/aps.key") if err != nil { @@ -131,7 +135,7 @@ func main() { } // Create socket that listens for connections from the main server - l, err := net.Listen("unix", "../apnd.socket") + l, err := net.Listen("unix", *sock_path) if err != nil { log.Fatal("listen error:", err) }