fix error (#960)

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
This commit is contained in:
Manuel Sabban 2021-09-10 11:06:25 +02:00 committed by GitHub
parent 652b75ee68
commit e67fad06d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ function clear_backup() {
}
function modify_config() {
PLUGINS_DIR=$(find /usr -type d -wholename "*"crowdsec/plugins)
PLUGINS_DIR=$(sudo find /usr -type d -wholename "*"crowdsec/plugins)
sed -i "s#/usr/local/lib/crowdsec/plugins#${PLUGINS_DIR}#g" ./config/config.yaml
cat ./config/config.yaml | sed 's/group: nogroup/group: '$(groups nobody | cut -d ':' -f2 | tr -d ' ')'/' | sudo tee /etc/crowdsec/config.yaml > /dev/null
cat ./config/http.yaml | sudo tee /etc/crowdsec/notifications/http.yaml > /dev/null