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