fix fc35 package (#1198)

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
This commit is contained in:
Manuel Sabban 2022-01-24 11:33:28 +01:00 committed by GitHub
parent 8310c10ce3
commit 0814a7b19d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,8 +72,6 @@ install -m 644 plugins/notifications/slack/slack.yaml %{buildroot}%{_sysconfdir}
install -m 644 plugins/notifications/http/http.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
install -m 644 plugins/notifications/splunk/splunk.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
%clean
rm -rf %{buildroot}
@ -175,7 +173,6 @@ if [ $1 == 1 ]; then
cscli hub update
CSCLI_BIN_INSTALLED="/usr/bin/cscli" SILENT=true install_collection
systemctl start crowdsec || echo "crowdsec is not started"
elif [ $1 == 2 ] && [ -d /var/lib/crowdsec/backup ]; then
cscli config restore /var/lib/crowdsec/backup
@ -194,6 +191,13 @@ fi
%systemd_post %{name}.service
if [ $1 == 1 ]; then
%if 0%{?fc35}
systemctl enable crowdsec
%endif
systemctl start crowdsec || echo "crowdsec is not started"
fi
%preun
#systemctl stop crowdsec || echo "crowdsec was not started"