mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-23 12:15:36 +02:00
add crowdsec warning to installer
This commit is contained in:
parent
af68aa692c
commit
1c2ba4076a
1 changed files with 71 additions and 70 deletions
|
@ -2,19 +2,19 @@ package main
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"embed"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"os"
|
||||
"time"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"bytes"
|
||||
"text/template"
|
||||
"time"
|
||||
"unicode"
|
||||
|
||||
"golang.org/x/term"
|
||||
|
@ -95,10 +95,11 @@ func main() {
|
|||
}
|
||||
|
||||
if !checkIsCrowdsecInstalledInCompose() {
|
||||
fmt.Println("\n=== Crowdsec Install ===")
|
||||
fmt.Println("\n=== CrowdSec Install ===")
|
||||
// check if crowdsec is installed
|
||||
if readBool(reader, "Would you like to install Crowdsec?", true) {
|
||||
|
||||
if readBool(reader, "Would you like to install CrowdSec?", false) {
|
||||
fmt.Println("This installer constitutes a minimal viable CrowdSec deployment. CrowdSec will add extra complexity to your Pangolin installation and may not work to the best of its abilities out of the box. Users are expected to implement configuration adjustments on their own to achieve the best security posture. Consult the CrowdSec documentation for detailed configuration instructions.")
|
||||
if readBool(reader, "Are you willing to manage CrowdSec?", true) {
|
||||
if config.DashboardDomain == "" {
|
||||
traefikConfig, err := ReadTraefikConfig("config/traefik/traefik_config.yml", "config/traefik/dynamic_config.yml")
|
||||
if err != nil {
|
||||
|
@ -124,6 +125,7 @@ func main() {
|
|||
installCrowdsec(config)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("Installation complete!")
|
||||
}
|
||||
|
@ -376,7 +378,6 @@ func createConfigFiles(config Config) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
func installDocker() error {
|
||||
// Detect Linux distribution
|
||||
cmd := exec.Command("cat", "/etc/os-release")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue