forked from rackerlabs/recap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecap.spec
119 lines (92 loc) · 4.31 KB
/
recap.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Name: recap
Version: 0.9.10
Release: 1%{?dist}
Summary: System status reporting
Group: Applications/System
License: GPLv2
Url: https://github.com/rackerlabs/%{name}
Source0: https://github.com/rackerlabs/%{name}/archive/%{version}.tar.gz
BuildArch: noarch
%{?el5:BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
Requires: sysstat, coreutils, procps, grep, gawk, bc, net-tools
%description
This program is intended to be used as a companion for the reporting provided by sysstat. It
will create a set of reports summarizing hardware resource utilization. The script also provides
optional reporting on Apache, MySQL, and network connections.
%prep
%setup -q
%install
%{?el5:%{__rm} -rf %{buildroot}}
%{__install} -Dm0755 recap %{buildroot}%{_sbindir}/recap
%{__install} -Dm0755 recaptool %{buildroot}%{_sbindir}/recaptool
%{__install} -Dm0644 recap.conf %{buildroot}%{_sysconfdir}/recap
%{__install} -Dm0644 recap.cron %{buildroot}%{_sysconfdir}/cron.d/recap
%{__install} -Dm0644 recap.conf.d %{buildroot}%{_sysconfdir}/httpd/conf.d/recap
%{__install} -Dm0644 recap.5.gz %{buildroot}%{_mandir}/man5/recap.5.gz
%{__install} -Dm0644 recap.8.gz %{buildroot}%{_mandir}/man8/recap.8.gz
%{__install} -dm0700 %{buildroot}%{_localstatedir}/log/recap
%{?el5:%clean}
%{?el5:%{__rm} -rf %{buildroot}}
%files
%doc README.md TODO CHANGELOG COPYING
%dir %{_localstatedir}/log/recap
%{_sbindir}/recap
%{_sbindir}/recaptool
%config(noreplace) %{_sysconfdir}/cron.d/recap
%config(noreplace) %{_sysconfdir}/httpd/conf.d/recap
%config(noreplace) %{_sysconfdir}/recap
%{_mandir}/man5/recap.5.gz
%{_mandir}/man8/recap.8.gz
%post
if [ -f /etc/rs-sysmon ]; then
echo "Found configuration file in old location (/etc/rs-sysmon), moving it to the new location (/etc/recap)."
mv /etc/recap /etc/recap.orig
mv /etc/rs-sysmon /etc/recap
fi
echo
echo "Checking for output directories..."
if [ -d /var/log/rs-sysmon ]; then
echo
echo "Found old output directory: /var/log/rs-sysmon"
echo "Moving resources logs to /var/log/recap"
mv /var/log/rs-sysmon/* /var/log/recap
echo "Removing old output directory: /var/log/rs-sysmon"
rm -r /var/log/rs-sysmon
echo
echo "Your output files have been consolidated to /var/log/recap, and the old output directories have been removed. If you see any errors above, there may have been some unexpected files that prevented the old directories from being emptied."
fi
echo
echo "The cron execution of recap is set to run every 10 minutes and at reboot by default."
echo "Edit /etc/cron.d/recap to change cron execution."
%changelog
* Mon Dec 21 2015 Carl George <carl.george@rackspace.com> - 0.9.10-1
- Latest version
- Update dependencies
* Wed Jan 07 2015 Carl George <carl.george@rackspace.com> - 0.9.8-1
- Latest version
* Thu Nov 1 2012 Benjamin H. Graham <ben@administr8.me>
-First public release GPLv2, special thanks to Rackspace IPC, Brent Oswald, and Benjamin H. Graham
-Changed name to recap, added links for new repository
-Added recaptool and installer
* Tue Nov 16 2010 Jacob Walcik <jacob.walcik@rackspce.com>
-Added COPYING file to specify license as GPL
-Added full list of dependencies for basic reporting
-Updated description
* Thu May 27 2010 David King <david.king@rackspace.com>
-Changed version number of recap release and added a configuration file for apache to access recap logs
* Tue Oct 20 2009 David King <david.king@rackspace.com>
-Changed /etc/cron.d/recap and /etc/recap to be config noreplace files
* Thu Nov 13 2008 Jacob Walcik <jacob.walcik@rackspace.com>
-modified default mode of the output directory
* Thu Nov 01 2007 Carl Thompson <carl.thompson@rackspace.com>
-added support for service httpd fullstatus by Jacob Walcik <jacob.walcik@rackspace.com>
* Wed Sep 12 2007 Carl Thompson <carl.thompson@rackspace.com>
-added man pages created by Jacob Walcik <jacob.walcik@rackspace.com>
* Thu Jul 12 2007 Carl Thompson <carl.thompson@rackspace.com>
-Added pstree support
* Tue Jul 10 2007 Carl Thompson <carl.thompson@rackspace.com>
-Fixed permissions on cron file, added 2 cron tasks for @reboot in cron file
* Tue Jul 10 2007 Carl Thompson <carl.thompson@rackspace.com>
-Added sar -q and inline documentation, relocated doc to recap-version
* Mon Jul 09 2007 Carl Thompson <carl.thompson@rackspace.com>
-Initial build of package