]>
Commit | Line | Data |
---|---|---|
fdb71f6a | 1 | Summary: Process monitor and restart utility |
e78603a4 | 2 | Summary(pl.UTF-8): Narzędzie do monitorowania procesów i ich restartowania |
14b3c34c | 3 | Name: monit |
4b7f41ce | 4 | Version: 5.9 |
749e7cee | 5 | Release: 2 |
4b7f41ce | 6 | License: AGPL v3 |
6cefd882 | 7 | Group: Daemons |
e0057d64 | 8 | Source0: http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz |
4b7f41ce | 9 | # Source0-md5: 808473ebbacda0c5085d7399e507bfda |
14b3c34c | 10 | Source1: %{name}.init |
6f726317 | 11 | Source2: %{name}rc |
e09b5b4a | 12 | Source3: %{name}.config |
4b7f41ce | 13 | Patch0: config.patch |
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 |
4b7f41ce | 36 | %patch0 -p1 |
fdb71f6a AM |
37 | |
38 | %build | |
3d086971 | 39 | %configure \ |
4b7f41ce | 40 | --bindir=%{_sbindir} \ |
3d086971 | 41 | --with-ssl-lib-dir=%{_libdir} |
fdb71f6a AM |
42 | %{__make} |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
4b7f41ce | 46 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig} |
fdb71f6a AM |
47 | %{__make} install \ |
48 | DESTDIR=$RPM_BUILD_ROOT | |
49 | ||
4b7f41ce ER |
50 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
51 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit | |
52 | ||
53 | cp -p monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc | |
6f726317 | 54 | # NOTE: 'include *.monitrc' will fail if nothing matches the glob. |
4b7f41ce ER |
55 | # so install dummy config not to remove it with upgrades (avoid .rpmsave) |
56 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc | |
fdb71f6a AM |
57 | |
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %post | |
62 | /sbin/chkconfig --add %{name} | |
3d130d51 | 63 | %service monit restart "Monit Daemon" |
fdb71f6a AM |
64 | |
65 | %preun | |
66 | if [ "$1" = "0" ]; then | |
3d130d51 | 67 | %service monit stop |
14ec2da6 | 68 | /sbin/chkconfig --del %{name} |
fdb71f6a AM |
69 | fi |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
4b7f41ce ER |
73 | %doc CONTRIBUTORS README* |
74 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monitrc | |
75 | %dir %attr(751,root,root) %{_sysconfdir}/%{name} | |
6f726317 | 76 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc |
4b7f41ce | 77 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit |
fdb71f6a | 78 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
4b7f41ce ER |
79 | %attr(755,root,root) %{_sbindir}/monit |
80 | %{_mandir}/man1/monit.1* |