File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4747
4848func main () {
4949 flag .Parse ()
50+ if flag .NArg () != 0 {
51+ log .Fatalf ("usage: hallpass [flags]" )
52+ }
5053
5154 ts := & tsnet.Server {
5255 Hostname : "hallpass" ,
@@ -87,6 +90,7 @@ func main() {
8790 log .Printf ("Hostname is %s, IPs %v" , js .fqdn , st .TailscaleIPs )
8891
8992 if * secretServer != "" {
93+ log .Printf ("Using setec secrets from %q" , * secretServer )
9094 ss , err := setec .NewStore (context .Background (), setec.StoreConfig {
9195 Client : setec.Client {
9296 Server : * secretServer ,
@@ -103,11 +107,10 @@ func main() {
103107 defer ss .Close ()
104108 js .oauthClientSecret = ss .Secret (* oauthSecret )
105109 js .webhookURL = ss .Secret (* webhookSecret )
106- log .Printf ("Using setec secrets from %q" , * secretServer )
107110 } else {
111+ log .Printf ("Using secrets from disk" )
108112 js .oauthClientSecret = setec .StaticSecret (readFile (* oauthSecret ))
109113 js .webhookURL = setec .StaticSecret (readFile (* webhookSecret ))
110- log .Printf ("Using secrets from disk" )
111114 }
112115
113116 ln , err := ts .Listen ("tcp" , ":80" )
You can’t perform that action at this time.
0 commit comments