postinst: update check for enabled lapi (#2674)

This commit is contained in:
mmetc 2023-12-19 21:46:34 +01:00 committed by GitHub
parent 6e34d609b7
commit 240f057f95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
debian/postinst vendored
View file

@ -91,7 +91,7 @@ if [ "$1" = configure ]; then
systemctl --quiet is-enabled crowdsec || systemctl unmask crowdsec && systemctl enable crowdsec
API=$(cscli config show --key "Config.API.Server")
if [ "$API" = "<nil>" ] ; then
if [ "$API" = "nil" ] ; then
LAPI=false
else
PORT=$(cscli config show --key "Config.API.Server.ListenURI"|cut -d ":" -f2)

View file

@ -199,7 +199,7 @@ fi
if [ $1 == 1 ]; then
API=$(cscli config show --key "Config.API.Server")
if [ "$API" = "<nil>" ] ; then
if [ "$API" = "nil" ] ; then
LAPI=false
else
PORT=$(cscli config show --key "Config.API.Server.ListenURI"|cut -d ":" -f2)