summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-05-22 13:59:01 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-05-22 13:59:01 (GMT)
commitaf45a8d8c845649ef9ede55cd0204462cad0ad82 (patch)
tree85332fa12f3f2896516a60a3cc80cb7de90134b7 /abs
parent7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff)
downloadlinhes_pkgbuild-af45a8d8c845649ef9ede55cd0204462cad0ad82.zip
linhes_pkgbuild-af45a8d8c845649ef9ede55cd0204462cad0ad82.tar.gz
linhes_pkgbuild-af45a8d8c845649ef9ede55cd0204462cad0ad82.tar.bz2
xymon client/server: fix logrotate, so it doesn't create files like log.1.1.1.1.1.1.1..1.1.1.1.1 and use up all the inodes.
server: fix permissions on the snap reports refs #921
Diffstat (limited to 'abs')
-rwxr-xr-xabs/core/xymon/PKGBUILD11
-rwxr-xr-x[-rw-r--r--]abs/core/xymon/logrotate-client.xymon21
-rw-r--r--abs/core/xymon/logrotate-server.xymon5
-rwxr-xr-x[-rw-r--r--]abs/core/xymon/xymon.install9
4 files changed, 30 insertions, 16 deletions
diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD
index 8441779..a197b03 100755
--- a/abs/core/xymon/PKGBUILD
+++ b/abs/core/xymon/PKGBUILD
@@ -1,7 +1,7 @@
pkgbase=xymon
pkgname=(xymonserver xymonclient)
pkgver=4.3.5
-pkgrel=44
+pkgrel=46
pkgdesc="Hobbit is a system for monitoring servers and networks. "
license="GPL"
arch=('i686' 'x86_64')
@@ -74,7 +74,7 @@ package_xymonserver(){
install -D -m644 $startdir/src/logrotate-server.xymon $startdir/pkg/xymonserver/etc/logrotate.d/xymon-server
# fix env for mythtb bindingds
- echo "MYTHCONFDIR=/usr/share/mythtv" >> $startdir/pkg/xymonserver/home/xymon/etc/xymonserver.cfg
+ echo "MYTHCONFDIR=/usr/share/mythtv" >> $startdir/pkg/xymonserver/home/xymon/etc/xymonserver.cfg
#copy in replacment icon set
@@ -90,13 +90,16 @@ package_xymonserver(){
patch -p0 < $startdir/src/xymonserver.cfg.diff || return 1
patch -p3 < $startdir/src/client-local.cfg.patch || return 1
patch -p3 < $startdir/src/hosts.cfg.patch || return 1
-
+
#fix permissions
chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/
chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/
chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/notes/
chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/gifs/
+ chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/snap/
+ chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/rep/
chmod 750 $startdir/pkg/xymonserver/etc/sudoers.d
+
}
@@ -136,7 +139,7 @@ md5sums=('31923ec126fe1c264fceb459d2175161'
'622f400fd098cbc43c203e3210a6694e'
'84442377c6e914b65519076bda4e17a4'
'd7116dc59319b893e90a26e6beb83994'
- '67621b6c5a766ac03c5f407bdbdca810'
+ '0a63d66de7e74daef24899da0a4042ab'
'7ad4871af35f82c7824bb682b9325dba'
'98e9242ae346f729b14cb195786571f2'
'31ac5c1f6dcc9408b64c4107b325a9a6'
diff --git a/abs/core/xymon/logrotate-client.xymon b/abs/core/xymon/logrotate-client.xymon
index a312b64..0fadb2e 100644..100755
--- a/abs/core/xymon/logrotate-client.xymon
+++ b/abs/core/xymon/logrotate-client.xymon
@@ -1,14 +1,15 @@
/home/xymon/client/logs/* {
- missingok
- size 512K
- rotate 0
- compress
- postrotate
- if [ -f /service/xymon-client/run ]
- then
- sv hup xymon-client
- fi
+ missingok
+ notifempty
+ size 512k
+ rotate 2
+ compress
+ postrotate
+ if [ -f /service/xymon-client/run ]
+ then
+ sv hup xymon-client
+ fi
- endscript
+ endscript
}
diff --git a/abs/core/xymon/logrotate-server.xymon b/abs/core/xymon/logrotate-server.xymon
index 2267da8..cdbf339 100644
--- a/abs/core/xymon/logrotate-server.xymon
+++ b/abs/core/xymon/logrotate-server.xymon
@@ -1,7 +1,8 @@
/var/log/hobbit/* {
missingok
- size 512K
- rotate 0
+ notifempty
+ size 512k
+ rotate 2
compress
postrotate
if [ -f /service/xymon-server/run ]
diff --git a/abs/core/xymon/xymon.install b/abs/core/xymon/xymon.install
index 3c9680b..90af45b 100644..100755
--- a/abs/core/xymon/xymon.install
+++ b/abs/core/xymon/xymon.install
@@ -17,9 +17,18 @@ post_install() {
sed -i -e "s/localhost/$hostname/" /home/xymon/server/etc/hosts.cfg
sed -i -e "s/\# bbd/\# bbd func/" /home/xymon/server/etc/hosts.cfg
sed -i -e "s/localhost/$hostname/" /home/xymon/server/etc/xymonserver.cfg
+ #fix permissions
chown -R nobody /home/xymon
chown -R nobody /data/srv/httpd/htdocs/xymon
+
+
+ chown -R nobody:http /data/srv/httpd/htdocs/xymon/snap
+ chown -R nobody:http /data/srv/httpd/htdocs/xymon/rep
+ chmod -R 775 /data/srv/httpd/htdocs/xymon/rep
+ chmod -R 775 /data/srv/httpd/htdocs/xymon/snap
+
chown -R nobody /var/log/hobbit
+
chown root /home/xymon/server/bin/xymonping
chmod +s /home/xymon/server/bin/xymonping