don't attempt to start crowdsec if LAPI has been disabled with debconf (#1016)
This commit is contained in:
parent
a7b1c02bd5
commit
66919924d3
1 changed files with 2 additions and 2 deletions
4
debian/postinst
vendored
4
debian/postinst
vendored
|
@ -89,10 +89,10 @@ if [ "$1" = configure ]; then
|
||||||
|
|
||||||
systemctl --quiet is-enabled crowdsec || systemctl unmask crowdsec && systemctl enable crowdsec
|
systemctl --quiet is-enabled crowdsec || systemctl unmask crowdsec && systemctl enable crowdsec
|
||||||
|
|
||||||
if [ -z "$(ss -nlt 'sport = 8080' | grep -v ^State)" ]; then
|
if [ -z "$(ss -nlt 'sport = 8080' | grep -v ^State)" ] || [ "$LAPI" = false ]; then
|
||||||
systemctl start crowdsec
|
systemctl start crowdsec
|
||||||
else
|
else
|
||||||
echo "Not attempting to start crowdsec, port 8080 is already used"
|
echo "Not attempting to start crowdsec, port 8080 is already used or lapi was disabled"
|
||||||
echo "This port is configured through /etc/crowdsec/config.yaml and /etc/crowdsec/local_api_credentials.yaml"
|
echo "This port is configured through /etc/crowdsec/config.yaml and /etc/crowdsec/local_api_credentials.yaml"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue