mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-17 05:53:15 +02:00
Refactor jail.local and jail.d management
This commit is contained in:
@@ -252,6 +252,21 @@ func (lc *LocalConnector) TestFilter(ctx context.Context, filterName string, log
|
||||
return TestFilterLocal(filterName, logLines)
|
||||
}
|
||||
|
||||
// GetJailConfig implements Connector.
|
||||
func (lc *LocalConnector) GetJailConfig(ctx context.Context, jail string) (string, error) {
|
||||
return GetJailConfig(jail)
|
||||
}
|
||||
|
||||
// SetJailConfig implements Connector.
|
||||
func (lc *LocalConnector) SetJailConfig(ctx context.Context, jail, content string) error {
|
||||
return SetJailConfig(jail, content)
|
||||
}
|
||||
|
||||
// TestLogpath implements Connector.
|
||||
func (lc *LocalConnector) TestLogpath(ctx context.Context, logpath string) ([]string, error) {
|
||||
return TestLogpath(logpath)
|
||||
}
|
||||
|
||||
func executeShellCommand(ctx context.Context, command string) (string, error) {
|
||||
parts := strings.Fields(command)
|
||||
if len(parts) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user