Skip to content

Commit

Permalink
rename --[cert|key]-file to --tls-[cert|keu] flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Feb 5, 2025
1 parent 05b6f45 commit 73f535c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func NewCmdUp() *cobra.Command {
httpAddr string
sshAddr string
sshHostKey string
certFile string
keyFile string
tlsCert string
tlsKey string
acmdnsCreds string
}

Expand Down Expand Up @@ -152,14 +152,14 @@ func NewCmdUp() *cobra.Command {

addr := flags.httpAddr
if addr == "" {
if flags.certFile != "" || flags.keyFile != "" {
if flags.tlsCert != "" || flags.tlsKey != "" {
addr = "0.0.0.0:443"
} else {
addr = "localhost:7777"
}
}

listener, err := getListener(addr, flags.certFile, flags.keyFile)
listener, err := getListener(addr, flags.tlsCert, flags.tlsKey)
if err != nil {
return fmt.Errorf("failed to get listener: %v", err)
}
Expand Down Expand Up @@ -340,8 +340,8 @@ func NewCmdUp() *cobra.Command {
cmd.Flags().StringVar(&flags.httpAddr, "http-addr", "", "address to listen on")
cmd.Flags().StringVar(&flags.sshAddr, "ssh-addr", "", "address to listen on for ssh/sftp")
cmd.Flags().StringVar(&flags.sshHostKey, "ssh-host-key", "~/.ssh/smallweb", "ssh host key")
cmd.Flags().StringVar(&flags.certFile, "cert-file", "", "tls certificate file")
cmd.Flags().StringVar(&flags.keyFile, "key-file", "", "key file")
cmd.Flags().StringVar(&flags.tlsCert, "tls-cert", "", "tls certificate file")
cmd.Flags().StringVar(&flags.tlsKey, "tls-key", "", "tls key file")
cmd.Flags().BoolVar(&flags.cron, "cron", false, "enable cron jobs")
cmd.Flags().StringVar(&flags.acmdnsCreds, "acmedns-credentials", "", "acme dns credentials")

Expand Down

0 comments on commit 73f535c

Please sign in to comment.