mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-26 22:20:18 +01:00
ClamAV arguments
This commit is contained in:
parent
d03dadc669
commit
7471990ef5
2 changed files with 16 additions and 0 deletions
10
cmd/cmd.go
10
cmd/cmd.go
|
@ -111,6 +111,12 @@ var globalFlags = []cli.Flag{
|
||||||
Usage: "path to storage",
|
Usage: "path to storage",
|
||||||
Value: "",
|
Value: "",
|
||||||
},
|
},
|
||||||
|
cli.StringFlag{
|
||||||
|
Name: "clamav-host",
|
||||||
|
Usage: "clamav-host",
|
||||||
|
Value: "",
|
||||||
|
EnvVar: "CLAMAV_HOST",
|
||||||
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "profiler",
|
Name: "profiler",
|
||||||
Usage: "enable profiling",
|
Usage: "enable profiling",
|
||||||
|
@ -170,6 +176,10 @@ func New() *Cmd {
|
||||||
options = append(options, server.UseLetsEncrypt(strings.Split(v, ",")))
|
options = append(options, server.UseLetsEncrypt(strings.Split(v, ",")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if v := c.String("clamav-host"); v != "" {
|
||||||
|
options = append(options, server.ClamavHost(v))
|
||||||
|
}
|
||||||
|
|
||||||
if cert := c.String("tls-cert-file"); cert == "" {
|
if cert := c.String("tls-cert-file"); cert == "" {
|
||||||
} else if pk := c.String("tls-private-key"); pk == "" {
|
} else if pk := c.String("tls-private-key"); pk == "" {
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -60,6 +60,12 @@ const _24K = (1 << 20) * 24
|
||||||
|
|
||||||
type OptionFn func(*Server)
|
type OptionFn func(*Server)
|
||||||
|
|
||||||
|
func ClamavHost(s string) OptionFn {
|
||||||
|
return func(srvr *Server) {
|
||||||
|
srvr.ClamAVDaemonHost = s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Listener(s string) OptionFn {
|
func Listener(s string) OptionFn {
|
||||||
return func(srvr *Server) {
|
return func(srvr *Server) {
|
||||||
srvr.ListenerString = s
|
srvr.ListenerString = s
|
||||||
|
|
Loading…
Reference in a new issue