|
@@ -14,8 +14,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
BuildRequires: git
|
|
|
BuildRequires: make
|
|
|
-BuildRequires: jq
|
|
|
BuildRequires: systemd
|
|
|
+Requires: crontabs
|
|
|
%{?fc33:BuildRequires: systemd-rpm-macros}
|
|
|
%{?fc34:BuildRequires: systemd-rpm-macros}
|
|
|
%{?fc35:BuildRequires: systemd-rpm-macros}
|
|
@@ -52,6 +52,7 @@ mkdir -p %{buildroot}%{_sharedstatedir}/%{name}/plugins
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/crowdsec/notifications/
|
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}/plugins/
|
|
|
|
|
|
+
|
|
|
install -m 755 -D cmd/crowdsec/crowdsec %{buildroot}%{_bindir}/%{name}
|
|
|
install -m 755 -D cmd/crowdsec-cli/cscli %{buildroot}%{_bindir}/cscli
|
|
|
install -m 755 -D wizard.sh %{buildroot}/usr/share/crowdsec/wizard.sh
|
|
@@ -61,6 +62,7 @@ install -m 600 -D config/config.yaml %{buildroot}%{_sysconfdir}/crowdsec
|
|
|
install -m 644 -D config/simulation.yaml %{buildroot}%{_sysconfdir}/crowdsec
|
|
|
install -m 644 -D config/profiles.yaml %{buildroot}%{_sysconfdir}/crowdsec
|
|
|
install -m 644 -D config/console.yaml %{buildroot}%{_sysconfdir}/crowdsec
|
|
|
+install -m 750 -D config/%{name}.cron.daily %{buildroot}%{_sysconfdir}/cron.daily/%{name}
|
|
|
install -m 644 -D %{SOURCE1} %{buildroot}%{_presetdir}
|
|
|
|
|
|
install -m 551 plugins/notifications/slack/notification-slack %{buildroot}%{_libdir}/%{name}/plugins/
|
|
@@ -118,6 +120,7 @@ rm -rf %{buildroot}
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/notifications/slack.yaml
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/notifications/splunk.yaml
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/notifications/email.yaml
|
|
|
+%config(noreplace) %{_sysconfdir}/cron.daily/%{name}
|
|
|
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
|
@@ -175,7 +178,6 @@ if [ $1 == 1 ]; then
|
|
|
fi
|
|
|
|
|
|
cscli hub update
|
|
|
- install_cronjob
|
|
|
CSCLI_BIN_INSTALLED="/usr/bin/cscli" SILENT=true install_collection
|
|
|
|
|
|
#upgrade
|
|
@@ -228,8 +230,8 @@ if [ $1 == 0 ]; then
|
|
|
rm -rf /etc/crowdsec/hub
|
|
|
fi
|
|
|
|
|
|
-if [ -d "/etc/cron.daily/" ] && [ -f "/etc/cron.daily/crowdsec-hub" ]; then
|
|
|
- rm /etc/cron.daily/crowdsec-hub
|
|
|
+if [ -f "/etc/cron.daily/crowdsec-hub" ]; then
|
|
|
+ rm /etc/cron.daily/crowdsec
|
|
|
fi
|
|
|
|
|
|
#systemctl stop crowdsec || echo "crowdsec was not started"
|