wok view monitorix/receipt @ rev 23258
updated ode and ode-dev (0.16 -> 0.16.1)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 26 06:55:46 2020 +0100 (2020-03-26) |
parents | 44ed5441e630 |
children | ad8b9ff412d2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="monitorix"
4 VERSION="3.12.0"
5 CATEGORY="misc"
6 SHORT_DESC="A lightweight system monitoring tool."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.monitorix.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}$TARBALL"
14 SUGGESTED="iptables logrotate"
15 DEPENDS="perl-dbi perl-cgi perl-config-general perl-http-server-simple \
16 perl-libwww perl-mailtools perl-mime-lite perl-xml-simple rrdtool-perl"
17 BUILD_DEPENDS=""
19 # Rules to gen a SliTaz package suitable for Tazpkg.
20 genpkg_rules()
21 {
22 mkdir -p $fs/usr/lib
23 mkdir -p $fs/usr/bin
24 mkdir -p $fs/etc/logrotate.d
25 mkdir -p $fs/usr/share/monitorix/cgi
27 cp -a $src/monitorix.conf $fs/etc
28 sed -i 's|/var/lib/monitorix|/usr/lib/monitorix|' \
29 $fs/etc/monitorix.conf
30 sed -i 's|group = nobody|group = nogroup|' \
31 $fs/etc/monitorix.conf
32 cp -a $src/docs/monitorix.logrotate \
33 $fs/etc/logrotate.d/monitorix
34 cp -a $src/monitorix $fs/usr/bin
35 cp -a $src/lib $fs/usr/lib/monitorix
36 cp -a $src/monitorix.cgi $src/*.png \
37 $src/reports $fs/usr/share/monitorix
38 }
40 post_install()
41 {
42 # Configure lighttpd server
43 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
44 then
45 if ! grep -q /usr/share/monitorix/ "$1/etc/lighttpd/lighttpd.conf"
46 then
47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/monitorix/" => "/usr/share/monitorix/",\n "/monitorix-cgi/" => "/usr/share/monitorix/cgi/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
48 if [ -z "$1" ]
49 then
50 # Start Web server.
51 /etc/init.d/lighttpd stop
52 /etc/init.d/lighttpd start
53 fi
54 fi
55 fi
57 # Configure apache server
58 if [ -f "$1/etc/apache/httpd.conf" ]
59 then
60 if [ ! -f "$1/etc/apache/conf.d/monitorix" ]
61 then
62 cat > "$1/etc/apache/conf.d/monitorix" <<EOT
63 Alias /monitorix /usr/share/monitorix
64 ScriptAlias /monitorix-cgi /usr/share/monitorix/cgi
66 <Directory /usr/share/monitorix/cgi/>
67 DirectoryIndex monitorix.cgi
68 Options ExecCGI
69 Order Deny,Allow
70 Deny from all
71 Allow from 127.0.0.1
72 </Directory>
74 EOT
75 if [ -z "$1" ]
76 then
77 # Start Web server.
78 /etc/init.d/apache stop
79 /etc/init.d/apache start
80 fi
81 fi
82 fi
83 }