|
@@ -167,19 +167,11 @@ if [ $1 == 1 ]; then
|
|
|
SILENT=true TMP_ACQUIS_FILE_SKIP=skip genacquisition
|
|
|
set +e
|
|
|
fi
|
|
|
- if [ ! -f "%{_sysconfdir}/crowdsec/online_api_credentials.yaml" ] && [ ! -f "%{_sysconfdir}/crowdsec/local_api_credentials.yaml" ] ; 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
|
|
|
- cscli machines add -a
|
|
|
- fi
|
|
|
if [ ! -f "%{_sysconfdir}/crowdsec/online_api_credentials.yaml" ] ; then
|
|
|
- touch %{_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
|
|
|
+ cscli machines add -a --force
|
|
|
fi
|
|
|
|
|
|
cscli hub update
|