mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-17 05:53:15 +02:00
Added function if reload fails after enabling any jail, all jails enabled in that request are automatically disabled
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bufio"
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -856,7 +857,7 @@ PYEOF
|
||||
|
||||
resolveOut = strings.TrimSpace(resolveOut)
|
||||
if strings.HasPrefix(resolveOut, "ERROR:") {
|
||||
return originalPath, "", nil, fmt.Errorf(strings.TrimPrefix(resolveOut, "ERROR:"))
|
||||
return originalPath, "", nil, errors.New(strings.TrimPrefix(resolveOut, "ERROR:"))
|
||||
}
|
||||
if strings.HasPrefix(resolveOut, "RESOLVED:") {
|
||||
resolvedPath = strings.TrimPrefix(resolveOut, "RESOLVED:")
|
||||
|
||||
Reference in New Issue
Block a user