From 9fb31b613d6265af7581bffa95aa58c6a4a9f020 Mon Sep 17 00:00:00 2001 From: sabban Date: Fri, 8 Dec 2023 10:23:30 +0100 Subject: [PATCH] fix post installation scripts --- rpm/SPECS/crowdsec.spec | 6 ++++-- windows/installer/product.wxs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rpm/SPECS/crowdsec.spec b/rpm/SPECS/crowdsec.spec index 557ec405c..759ec2000 100644 --- a/rpm/SPECS/crowdsec.spec +++ b/rpm/SPECS/crowdsec.spec @@ -171,15 +171,17 @@ if [ $1 == 1 ]; then install -m 600 /dev/null %{_sysconfdir}/crowdsec/online_api_credentials.yaml install -m 600 /dev/null %{_sysconfdir}/crowdsec/local_api_credentials.yaml cscli capi register - [ -s "%{_sysconfdir}/crowdsec/local_api_credentials.yaml" ] || cscli machines add -a + [ -s "%{_sysconfdir}/crowdsec/local_api_credentials.yaml" ] || cscli machines add -a --force fi if [ ! -f "%{_sysconfdir}/crowdsec/online_api_credentials.yaml" ] ; then touch %{_sysconfdir}/crowdsec/online_api_credentials.yaml + chmod 600 %{_sysconfdir}/crowdsec/online_api_credentials.yaml cscli capi register fi if [ ! -f "%{_sysconfdir}/crowdsec/local_api_credentials.yaml" ] ; then touch %{_sysconfdir}/crowdsec/local_api_credentials.yaml - cscli machines add -a + chmod 600 %{_sysconfdir}/crowdsec/local_api_credentials.yaml + [ -s "%{_sysconfdir}/crowdsec/local_api_credentials.yaml" ] || cscli machines add -a --force fi cscli hub update diff --git a/windows/installer/product.wxs b/windows/installer/product.wxs index fed814776..a0c1ea11e 100644 --- a/windows/installer/product.wxs +++ b/windows/installer/product.wxs @@ -143,7 +143,7 @@ - +