]>
Commit | Line | Data |
---|---|---|
e0057d64 | 1 | # |
fdb71f6a | 2 | Summary: Process monitor and restart utility |
e78603a4 | 3 | Summary(pl.UTF-8): Narzędzie do monitorowania procesów i ich restartowania |
14b3c34c | 4 | Name: monit |
e0057d64 | 5 | Version: 5.0.1 |
a35715f3 | 6 | Release: 2 |
2729d27b | 7 | License: GPL |
5c562b12 | 8 | Group: Applications/Console |
e0057d64 | 9 | Source0: http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz |
10 | # Source0-md5: 4a33f7f0b8d40264fb50370e6544f974 | |
14b3c34c | 11 | Source1: %{name}.init |
6f726317 | 12 | Source2: %{name}rc |
e0057d64 | 13 | URL: http://mmonit.com/monit/ |
fdb71f6a AM |
14 | BuildRequires: bison |
15 | BuildRequires: flex | |
44d81330 | 16 | BuildRequires: openssl-devel >= 0.9.7d |
3d130d51 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
14b3c34c | 18 | Requires(post,preun): /sbin/chkconfig |
976db287 | 19 | Requires: rc-scripts >= 0.4.0.15 |
fdb71f6a AM |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
23 | monit is an utility for monitoring daemons or similar programs running | |
24 | on a Unix system. It will start specified programs if they are not | |
25 | running and restart programs not responding. | |
26 | ||
b8a62915 JR |
27 | %description -l pl.UTF-8 |
28 | monit jest narzędziem do monitorowania demonów oraz podobnych | |
29 | programów pracujących w systemie Unix. monit zrestartuje podany | |
30 | program w momencie gdy przestaje on pracować lub w momencie gdy | |
31 | program przestaje odpowiadać. | |
fdb71f6a AM |
32 | |
33 | %prep | |
03278c9b | 34 | %setup -q |
fdb71f6a AM |
35 | |
36 | %build | |
3d086971 | 37 | %configure \ |
38 | --with-ssl-lib-dir=%{_libdir} | |
fdb71f6a AM |
39 | %{__make} |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
6f1ff528 | 43 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,monit},%{_sbindir}} |
fdb71f6a AM |
44 | |
45 | %{__make} install \ | |
46 | DESTDIR=$RPM_BUILD_ROOT | |
47 | ||
48 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
6f726317 ER |
49 | # NOTE: 'include *.monitrc' will fail if nothing matches the glob. |
50 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monitrc | |
51 | install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc | |
6f1ff528 | 52 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/monit |
fdb71f6a AM |
53 | |
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %post | |
58 | /sbin/chkconfig --add %{name} | |
3d130d51 | 59 | %service monit restart "Monit Daemon" |
fdb71f6a AM |
60 | |
61 | %preun | |
62 | if [ "$1" = "0" ]; then | |
3d130d51 | 63 | %service monit stop |
14ec2da6 | 64 | /sbin/chkconfig --del %{name} |
fdb71f6a AM |
65 | fi |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
649566ce | 69 | %doc doc/*.html CHANGES.txt CONTRIBUTORS FAQ.txt README* |
2839c248 | 70 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc |
6f1ff528 | 71 | %dir %attr(751,root,root) %{_sysconfdir}/monit |
6f726317 | 72 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc |
6f1ff528 | 73 | %attr(755,root,root) %{_sbindir}/monit |
fdb71f6a | 74 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
2839c248 | 75 | %{_mandir}/man?/* |