allow to start if only httpd service is enabled
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
88372b6da7
commit
bd118e61bc
2 changed files with 7 additions and 0 deletions
|
@ -591,6 +591,9 @@ func HasServicesToStart() bool {
|
|||
if globalConf.WebDAVD.ShouldBind() {
|
||||
return true
|
||||
}
|
||||
if globalConf.HTTPDConfig.ShouldBind() {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -386,6 +386,10 @@ func TestServiceToStart(t *testing.T) {
|
|||
sftpdConf := config.GetSFTPDConfig()
|
||||
sftpdConf.Bindings[0].Port = 0
|
||||
config.SetSFTPDConfig(sftpdConf)
|
||||
// httpd service is enabled
|
||||
assert.True(t, config.HasServicesToStart())
|
||||
httpdConf := config.GetHTTPDConfig()
|
||||
httpdConf.Bindings[0].Port = 0
|
||||
assert.False(t, config.HasServicesToStart())
|
||||
ftpdConf := config.GetFTPDConfig()
|
||||
ftpdConf.Bindings[0].Port = 2121
|
||||
|
|
Loading…
Reference in a new issue