- Move cleanup code to %pre because otherwise it doesnt trigger
early enough OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=82
This commit is contained in:
parent
54654d69c8
commit
47d5e0815e
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 14 16:35:33 UTC 2022 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- Move cleanup code to %pre because otherwise it doesnt trigger
|
||||
early enough
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 14 16:21:40 UTC 2022 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
|
11
rspamd.spec
11
rspamd.spec
@ -274,6 +274,12 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo
|
||||
%pre
|
||||
%{_sbindir}/groupadd -r %{rspamd_group} 2>/dev/null || :
|
||||
%{_sbindir}/useradd -g %{rspamd_group} -c "Rmilter user" -s /bin/false -r %{rspamd_user} 2>/dev/null || :
|
||||
#
|
||||
# cleanup bad unser files from earlier 3.4 builds
|
||||
# see https://github.com/rspamd/rspamd/issues/4329 for the details
|
||||
#
|
||||
echo "Cleaning up '*.unser' files in /var/lib/rspamd"
|
||||
find /var/lib/rspamd/ -type f -name '*.unser' -delete -print ||:
|
||||
%if 0%{?suse_version} && %{with systemd}
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
@ -293,11 +299,6 @@ echo "# Site-specific additions and overrides for 'usr.bin.rspamd'" > %{buildroo
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%postun
|
||||
#
|
||||
# cleanup bad unser files from earlier 3.4 builds
|
||||
# see https://github.com/rspamd/rspamd/issues/4329 for the details
|
||||
#
|
||||
find /var/lib/rspamd/ -type f -name '*.unser' -delete ||:
|
||||
%if %{with systemd}
|
||||
%service_del_postun %{name}.service
|
||||
%else
|
||||
|
Loading…
x
Reference in New Issue
Block a user