diff options
author | smac89 | 2023-10-12 00:38:34 -0600 |
---|---|---|
committer | smac89 | 2023-10-12 00:38:34 -0600 |
commit | 34cb35b8466b602db04fc02f8f1a6162a5860291 (patch) | |
tree | aeb3ddd0a6e1e2f8ee59cc3a61f9e06a7caa0c77 /cs-firewall-bouncer.install | |
parent | c927b1a4f37353d9012953675cb64eb9e36d04da (diff) | |
download | aur-crowdsec-firewall-bouncer.tar.gz |
fix sed command in install
Diffstat (limited to 'cs-firewall-bouncer.install')
-rw-r--r-- | cs-firewall-bouncer.install | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cs-firewall-bouncer.install b/cs-firewall-bouncer.install index b120eae414f4..24426cb943a0 100644 --- a/cs-firewall-bouncer.install +++ b/cs-firewall-bouncer.install @@ -9,7 +9,7 @@ post_install() { IFS=: read HOST PORT <<< `cscli config show --key "Config.API.Server.ListenURI"` export CROWDSEC_LAPI_URL="http://${HOST:-'127.0.0.1'}:${PORT:-'8080'}" - sed -iE "s|^(api_url\s*:).*|\1 $CROWDSEC_LAPI_URL|" /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml + sed -Ei "s|^(api_url\s*:).*|\1 $CROWDSEC_LAPI_URL|" /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml systemctl daemon-reload systemctl enable --now crowdsec-firewall-bouncer @@ -22,5 +22,7 @@ post_remove() { fi systemctl daemon-reload - systemctl disable --now crowdsec-firewall-bouncer + if systemctl is-enabled -q crowdsec-firewall-bouncer; then + systemctl disable --now crowdsec-firewall-bouncer + fi } |