wok-6.x view monitorix/receipt @ rev 22423

Up exo-tools & libexo (0.10.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 15 17:53:48 2019 +0100 (2019-12-15)
parents a78610b2eb47
children 442b472ff67d
line source
1 # SliTaz package receipt.
3 PACKAGE="monitorix"
4 VERSION="3.11.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-cgi perl-config-general perl-dbi 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|' $fs/etc/monitorix.conf
29 sed -i 's|group = nobody|group = nogroup|' $fs/etc/monitorix.conf
30 cp -a $src/docs/monitorix.logrotate $fs/etc/logrotate.d/monitorix
31 cp -a $src/monitorix $fs/usr/bin
32 cp -a $src/lib $fs/usr/lib/monitorix
33 cp -a $src/monitorix.cgi $src/*.png \
34 $src/reports $fs/usr/share/monitorix
35 }
37 post_install()
38 {
39 # Configure lighttpd server
40 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
41 if ! grep -q /usr/share/monitorix/ "$1/etc/lighttpd/lighttpd.conf"; then
42 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"
43 if [ -z "$1" ]; then
44 # Start Web server.
45 /etc/init.d/lighttpd stop
46 /etc/init.d/lighttpd start
47 fi
48 fi
49 fi
50 # Configure apache server
51 if [ -f "$1/etc/apache/httpd.conf" ]; then
52 if [ ! -f "$1/etc/apache/conf.d/monitorix" ]; then
53 cat > "$1/etc/apache/conf.d/monitorix" <<EOT
54 Alias /monitorix /usr/share/monitorix
55 ScriptAlias /monitorix-cgi /usr/share/monitorix/cgi
57 <Directory /usr/share/monitorix/cgi/>
58 DirectoryIndex monitorix.cgi
59 Options ExecCGI
60 Order Deny,Allow
61 Deny from all
62 Allow from 127.0.0.1
63 </Directory>
65 EOT
66 if [ -z "$1" ]; then
67 # Start Web server.
68 /etc/init.d/apache stop
69 /etc/init.d/apache start
70 fi
71 fi
72 fi
73 }