build with nfpm
This commit is contained in:
parent
2e30793188
commit
e1048e1173
4 changed files with 73 additions and 4 deletions
17
config/config.yaml
Normal file
17
config/config.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
working_dir: /tmp/
|
||||
data_dir: /var/lib/crowdsec/data
|
||||
config_dir: /etc/crowdsec/config/
|
||||
pid_dir: /var/run/
|
||||
log_dir: /var/log/crowdsec/
|
||||
cscli_dir: /etc/crowdsec/config/cscli
|
||||
log_mode: file
|
||||
log_level: info
|
||||
profiling: false
|
||||
sqlite_path: /var/lib/crowdsec/data/crowdsec.db
|
||||
apimode: true
|
||||
daemon: true
|
||||
prometheus: true
|
||||
#for prometheus agent / golang debugging
|
||||
http_listen: 127.0.0.1:6060
|
||||
plugin:
|
||||
backend: "/etc/crowdsec/plugins/backend"
|
|
@ -1,12 +1,11 @@
|
|||
[Unit]
|
||||
Description=Crowdwatch agent
|
||||
Description=CrowdSec agent
|
||||
After=syslog.target network.target remote-fs.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=${PID}/crowdsec.pid
|
||||
#ExecStartPre=${BIN} -c ${CFG}/default.yaml -t
|
||||
ExecStart=${BIN} -c ${CFG}/default.yaml
|
||||
PIDFile=/var/run/crowdsec.pid
|
||||
ExecStart=/usr/local/bin/crowdsec -c /etc/crowdsec/config/config.yaml
|
||||
ExecStartPost=/bin/sleep 0.1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
|
|
52
nfpm.yaml
Normal file
52
nfpm.yaml
Normal file
|
@ -0,0 +1,52 @@
|
|||
# nfpm example config file
|
||||
name: "crowdsec"
|
||||
arch: "amd64"
|
||||
platform: "linux"
|
||||
version: "v0.2.0"
|
||||
section: "default"
|
||||
priority: "extra"
|
||||
#replaces:
|
||||
#- foobar
|
||||
#provides:
|
||||
#- bar
|
||||
#depends:
|
||||
#- foo
|
||||
#- bar
|
||||
# recommends on rpm packages requires rpmbuild >= 4.13
|
||||
#recommends:
|
||||
#- whatever
|
||||
# suggests on rpm packages requires rpmbuild >= 4.13
|
||||
#suggests:
|
||||
#- something-else
|
||||
#conflicts:
|
||||
#- not-foo
|
||||
#- not-bar
|
||||
maintainer: "Crowdsec <crowdsec@crowdsec.net>"
|
||||
description: |
|
||||
Crowdsec - An open source, lightweight agent
|
||||
to detect and respond to bad behaviors
|
||||
vendor: "CrowdSec"
|
||||
homepage: "https://www.github.com/crowdsecurity/crowdsec"
|
||||
license: "MIT"
|
||||
files:
|
||||
./cmd/crowdsec-cli/cscli: "/usr/local/bin/cscli"
|
||||
./cmd/crowdsec/crowdsec: "/usr/local/bin/crowdsec"
|
||||
./wizard.sh: "/usr/local/bin/cswizard"
|
||||
./config/api.yaml: "/etc/crowdsec/config/api.yaml"
|
||||
./config/crowdsec_pull: "/etc/cron.d/crowdsec_pull"
|
||||
./config/crowdsec.service: "/etc/systemd/system/crowdsec.service"
|
||||
./config/config.yaml: "/etc/crowdsec/config/config.yaml"
|
||||
./config/profiles.yaml: "/etc/crowdsec/config/profiles.yaml"
|
||||
./config/user.yaml: "/etc/crowdsec/config/user.yaml"
|
||||
./config/patterns/* : "/etc/crowdsec/config/patterns/"
|
||||
|
||||
empty_folders:
|
||||
- /var/log/crowdsec/
|
||||
overrides:
|
||||
# rpm:
|
||||
# scripts:
|
||||
# preinstall: ./scripts/preinstall.sh
|
||||
# postremove: ./scripts/postremove.sh
|
||||
deb:
|
||||
scripts:
|
||||
postinstall: ./scripts/post_install_deb.sh
|
1
scripts/post_install_deb.sh
Normal file
1
scripts/post_install_deb.sh
Normal file
|
@ -0,0 +1 @@
|
|||
systemctl daemon-reload
|
Loading…
Add table
Reference in a new issue