avatar
mikhailnov has added 9d7938caa7
Fix post/preun scripts and systemd macros. atop.service execs atop.da...

...ily itself when needed.

... ... --- a/atop.spec
... ... +++ b/atop.spec
... ... @@ -1,7 +1,7 @@
1 1
Summary:	AT Computing System and Process Monitor
2 2
Name:		atop
3 3
Version:	2.3.0
4
Release:	1
4
Release:	2
5 5
License:	GPLv2+
6 6
Group:		Text tools
7 7
Url:		http://www.ATComputing.nl/atop
... ... @@ -11,7 +11,7 @@ Patch1: atop-2.3.0-makefile.patch
11 11
Buildrequires:	pkgconfig(ncurses)
12 12
Buildrequires:	pkgconfig(systemd)
13 13
Buildrequires:	pkgconfig(zlib)
14
Requires(post,preun):	rpm-helper
14
Requires(post,preun):	systemd
15 15
16 16
%description
17 17
The program atop is an interactive monitor to view the load on
... ... @@ -47,19 +47,10 @@ reports, similar to the program sar.
47 47
%{_var}/log/%{name}/dummy_before
48 48
49 49
%post
50
%_post_service atop
51
%_post_service atopacct
52
53
# save today's logfile (format might be incompatible)
54
mv %{_var}/log/atop/atop_`date +%Y%m%d` %{_var}/log/atop/atop_`date +%Y%m%d`.save \
55
					2> /dev/null || :
56
57
# activate daily logging for today
58
%{_datadir}/%{name}/atop.daily
50
%systemd_post atop.service atopacct.service
59 51
60 52
%preun
61
%_preun_service atop
62
%_preun_service atopacct
53
%systemd_preun atop.service atopacct.service
63 54
64 55
#----------------------------------------------------------------------------
65 56

Comments