Skip to content

Commit e4a093b

Browse files
committed
Add post uninstallation actions
Add %systemd_postun to %postun which runs systemctl daemon-reload after sysmotd is uninstalled
1 parent 5186fca commit e4a093b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

rpmbuild/SPECS/sysmotd.spec

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: sysmotd
2-
Version: 0.0.4
2+
Version: 0.0.5
33
Release: 1%{?dist}
44
Summary: Generates a MOTD (Message Of The Day) including system information on Fedora Linux
55
BuildArch: noarch
@@ -39,9 +39,9 @@ mkdir -p %{buildroot}/%{_unitdir}
3939
%{__install} -Dm644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
4040
%{__install} -Dm644 %{name}.timer %{buildroot}/%{_unitdir}/%{name}.timer
4141

42-
4342
%{__install} -Dm644 %{name}.preset %{buildroot}/%{_presetdir}/50-%{name}.preset
4443

44+
4545
%files
4646
%license LICENSE.txt
4747
%doc README.txt
@@ -56,25 +56,33 @@ mkdir -p %{buildroot}/%{_unitdir}
5656
%systemd_post %{name}.timer
5757
systemctl start %{name}.timer > /dev/null 2>&1
5858

59+
5960
%preun
6061

6162
%systemd_preun %{name}.timer
6263
%systemd_preun %{name}.service
6364

65+
6466
%postun
6567

68+
%systemd_postun %{name}.timer
69+
%systemd_postun %{name}.service
6670
rm -f /run/motd.d/*%{name}*
6771

6872

6973
%changelog
74+
* Mon Apr 29 2024 Manuel Fombuena <mfombuena@innovara.co.uk>
75+
- Version 0.0.5-1: changed sysmotd.timer starting point to OnActiveSec
76+
- Version 0.0.5-1: added %systemd_postun macro when uninstalling
77+
7078
* Mon Oct 2 2023 Manuel Fombuena <mfombuena@innovara.co.uk>
71-
- Version 0.0.4: mem_perc re-added
79+
- Version 0.0.4-1: mem_perc re-added
7280

7381
* Sun Oct 1 2023 Manuel Fombuena <mfombuena@innovara.co.uk>
74-
- Version 0.0.3: system information layout changed to a table to prevent misalignment of items
82+
- Version 0.0.3-1: system information layout changed to a table to prevent misalignment of items
7583

7684
* Thu Apr 27 2023 Manuel Fombuena <mfombuena@innovara.co.uk>
77-
- Version 0.0.2: SElinux info added
85+
- Version 0.0.2-1: SElinux info added
7886

7987
* Mon Dec 26 2022 Manuel Fombuena <mfombuena@innovara.co.uk>
80-
- Version 0.0.1: first version packaged
88+
- Version 0.0.1-1: first version packaged

0 commit comments

Comments
 (0)