Browse Source

make crowdsec own /etc/crowdsec/* (#947)

* make debian packages own /etc/crowdsec/*

* make package owns /etc/crowdsec/*

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
Manuel Sabban 3 years ago
parent
commit
21dd4851f1
2 changed files with 4 additions and 7 deletions
  1. 0 3
      debian/postinst
  2. 4 4
      debian/rules

+ 0 - 3
debian/postinst

@@ -21,9 +21,6 @@ if [ "$1" = configure ]; then
     
     
     . /usr/share/crowdsec/wizard.sh -n
     . /usr/share/crowdsec/wizard.sh -n
     if ! [[ -f /etc/crowdsec/config.yaml ]]; then
     if ! [[ -f /etc/crowdsec/config.yaml ]]; then
-        echo Creating crowdsec configuration in /etc/crowdsec
-        cp -a /usr/share/crowdsec/config/* /etc/crowdsec
-
         echo Creating /etc/crowdsec/acquis.yaml
         echo Creating /etc/crowdsec/acquis.yaml
         set +e
         set +e
         SILENT=true detect_services
         SILENT=true detect_services

+ 4 - 4
debian/rules

@@ -44,7 +44,7 @@ override_dh_auto_install:
 	cp cmd/crowdsec/crowdsec debian/crowdsec/usr/bin
 	cp cmd/crowdsec/crowdsec debian/crowdsec/usr/bin
 	cp cmd/crowdsec-cli/cscli debian/crowdsec/usr/bin
 	cp cmd/crowdsec-cli/cscli debian/crowdsec/usr/bin
 	cp wizard.sh debian/crowdsec/usr/share/crowdsec
 	cp wizard.sh debian/crowdsec/usr/share/crowdsec
-	cp config/config.yaml debian/crowdsec/usr/share/crowdsec/config/config.yaml
-	cp config/simulation.yaml debian/crowdsec/usr/share/crowdsec/config/simulation.yaml
-	cp config/profiles.yaml debian/crowdsec/usr/share/crowdsec/config/profiles.yaml
-	cp -a config/patterns debian/crowdsec/usr/share/crowdsec/config
+	cp config/config.yaml debian/crowdsec/etc/crowdsec/config.yaml
+	cp config/simulation.yaml debian/crowdsec/etc/crowdsec/simulation.yaml
+	cp config/profiles.yaml debian/crowdsec/etc/crowdsec/profiles.yaml
+	cp -a config/patterns debian/crowdsec/etc/crowdsec