summaryrefslogtreecommitdiffstats
path: root/abs/not_built/extra/monitorix
diff options
context:
space:
mode:
Diffstat (limited to 'abs/not_built/extra/monitorix')
-rw-r--r--abs/not_built/extra/monitorix/PKGBUILD47
-rw-r--r--abs/not_built/extra/monitorix/monitorix.rc.d56
-rw-r--r--abs/not_built/extra/monitorix/readme.install54
3 files changed, 157 insertions, 0 deletions
diff --git a/abs/not_built/extra/monitorix/PKGBUILD b/abs/not_built/extra/monitorix/PKGBUILD
new file mode 100644
index 0000000..d2dceec
--- /dev/null
+++ b/abs/not_built/extra/monitorix/PKGBUILD
@@ -0,0 +1,47 @@
+# Contributor: graysky <graysky AT archlinux dot us>
+# Contributor: res <andres87p gmail>
+
+pkgname=monitorix
+pkgver=1.5.2
+pkgrel=1
+pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
+arch=(any)
+url=http://www.$pkgname.org/
+license=(GPL)
+depends=('rrdtool' 'perl-libwww')
+optdepends=('lm_sensors: enable support for system temp monitoring'
+'hddtemp: enable support for hdd temp monitoring'
+'metamail: enable support for reports via system mail')
+
+backup=(etc/$pkgname.conf)
+source=($url$pkgname-$pkgver.tar.gz
+ monitorix.rc.d)
+install=('readme.install')
+
+build() {
+ cd $pkgname-$pkgver
+
+ install -D $pkgname.pl $pkgdir/usr/sbin/$pkgname.pl
+ install -D ../$pkgname.rc.d $pkgdir/etc/rc.d/$pkgname
+
+# use Arch defaults
+ sed -e '/^our $OSTYPE/ s,RHFC,Arch,' \
+ -e '/^our @HDDTEMP_LIST/ s,hda,sda,' < $pkgname.conf \
+ > $pkgdir/etc/$pkgname.conf
+ mkdir -p $pkgdir/var/lib/$pkgname/usage
+ cp -r reports $pkgdir/var/lib/$pkgname
+
+ mkdir -p $pkgdir/usr/share/doc/$pkgname
+ cp Changes $pkgname-apache.conf $pkgname-alert.sh README README.nginx TODO \
+ $pkgdir/usr/share/doc/$pkgname
+
+ install -dm777 $pkgdir/srv/http/$pkgname/imgs
+ cp {logo_bot,logo_top,${pkgname}ico}.png $pkgdir/srv/http/$pkgname
+
+ install -D $pkgname.cgi $pkgdir/srv/http/cgi-bin/$pkgname.cgi
+
+ gzip -9 man/man5/$pkgname.conf.5
+ install -Dm644 man/man5/$pkgname.conf.5.gz $pkgdir/usr/share/man/man5/$pkgname.conf.5.gz
+}
+sha256sums=('3d025d097fe8dd458501b8cf3345b80b1b66625ae257e21452b95d1596ec5b6d'
+ 'f9ba4e09f8e583808bc9fa5476ddac067182799512e103ea40565b7da47dbab6')
diff --git a/abs/not_built/extra/monitorix/monitorix.rc.d b/abs/not_built/extra/monitorix/monitorix.rc.d
new file mode 100644
index 0000000..24eb433
--- /dev/null
+++ b/abs/not_built/extra/monitorix/monitorix.rc.d
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# @(#) Fibranet NSP, SL
+# Copyright (C) 2005-2009 by Jordi Sanfeliu <jordi@fibranet.cat>
+#
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case $1 in
+ start)
+ stat_busy "Starting Monitorix"
+ if ck_daemon monitorix; then
+ # check for monitorix-tmps and if present execute it
+ if [ -x /etc/cron.hourly/sync-monitorix.sh ]; then
+ /etc/cron.hourly/sync-monitorix.sh >/dev/null 2>&1
+ fi
+ # Creates RRDs files if needed
+ /usr/sbin/monitorix.pl create >/dev/null 2>&1 || stat_die $?
+ /usr/sbin/monitorix.pl init >/dev/null 2>&1 || stat_die $?
+ add_daemon monitorix
+ # restart crond so data gets collected
+ /etc/rc.d/crond restart
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping Monitorix"
+ if ! ck_daemon monitorix; then
+ # check for monitorix-tmps and if present execute it
+ if [ -x /etc/cron.hourly/sync-monitorix.sh ]; then
+ /etc/cron.hourly/sync-monitorix.sh >/dev/null 2>&1
+ fi
+ /usr/sbin/monitorix.pl stop 2>&1 || stat_die $?
+ rm_daemon monitorix
+ # restart crond data stops getting collected
+ /etc/rc.d/crond restart
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ ;;
+esac
+
+exit 0
diff --git a/abs/not_built/extra/monitorix/readme.install b/abs/not_built/extra/monitorix/readme.install
new file mode 100644
index 0000000..2630018
--- /dev/null
+++ b/abs/not_built/extra/monitorix/readme.install
@@ -0,0 +1,54 @@
+post_install() {
+ echo '----------------------------------------------------------------------'
+ echo 'NOTE that you will need a mono-font for this package to work.'
+ echo 'There are many options here so I did not add one as a formal dep.'
+ echo 'You may use for example terminus-font. If your graphs have no numbers'
+ echo 'go ahead and install it. If they work as is you do not need it.'
+ echo ' '
+ echo 'Consider having your rrd databases for monitorix reside in RAM.'
+ echo 'D/L and build the monitorix-tmpfs package from the AUR:'
+ echo
+ echo ' http://aur.archlinux.org/packages.php?ID=34134'
+ echo '----------------------------------------------------------------------'
+}
+
+post_remove() {
+ echo '----------------------------------------------------------------------'
+ echo 'To remove all traces of monitorix from your system, you must manually'
+ echo 'remove the following dir trees (doing so will delete your databases):'
+ echo
+ echo '/var/lib/monitorix'
+ echo '/srv/http/monitorix'
+ echo '----------------------------------------------------------------------'
+}
+
+# $1: The new package version
+# $2: The old package version
+
+post_upgrade() {
+NEW=`echo $1 | cut -f-1 -d '-'`
+OLD=`echo $2 | cut -f-1 -d '-'`
+
+# if running the 1.4.2 series then display warning message
+
+if [ "$OLD" = "1.4.2" ]; then
+ echo '----------------------------------------------------------------------'
+ echo ' WARNING:'
+ echo
+ echo 'With this upgrade you MUST replace your current version of'
+ echo '/etc/monitorix.conf with /etc/monitorix.conf.pacnew which contains new'
+ echo 'configs needed by the 1.5.0 release of monitorix.'
+ echo
+ echo 'Simply do the following:'
+ echo '# cp /etc/monitorix.conf /etc/monitorix.conf.old'
+ echo '# mv /etc/monitorix.conf.pacnew /etc/monitorix.conf'
+ echo
+ echo 'Now you can compare your old config saved as /etc/monitorix.conf.old'
+ echo 'to your new config to ensure that you get all your config options into'
+ echo 'the new version.'
+ echo
+ echo 'Restart monitorix when you have completed the edit as well:'
+ echo '# /etc/rc.d/monitorix restart'
+ echo '----------------------------------------------------------------------'
+fi
+}