summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-server.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2017-01-19 20:15:58 (GMT)
committerBritney Fransen <brfransen@gmail.com>2017-01-19 20:15:58 (GMT)
commit1746d0620fa928d3a5d0270f03beff5f3cf44e41 (patch)
tree7fb7f8c8973c1ceabcb5fce2a06c7a7d31afb85e /abs/core/xymon/xymon-server.install
parent69653dc3c0c007d56b8dcfd709f21e7a301d3a5a (diff)
downloadlinhes_pkgbuild-1746d0620fa928d3a5d0270f03beff5f3cf44e41.zip
linhes_pkgbuild-1746d0620fa928d3a5d0270f03beff5f3cf44e41.tar.gz
linhes_pkgbuild-1746d0620fa928d3a5d0270f03beff5f3cf44e41.tar.bz2
xymon: update to 4.3.28
Diffstat (limited to 'abs/core/xymon/xymon-server.install')
-rw-r--r--abs/core/xymon/xymon-server.install85
1 files changed, 85 insertions, 0 deletions
diff --git a/abs/core/xymon/xymon-server.install b/abs/core/xymon/xymon-server.install
new file mode 100644
index 0000000..0eec8f1
--- /dev/null
+++ b/abs/core/xymon/xymon-server.install
@@ -0,0 +1,85 @@
+post_install() {
+ . /etc/systemconfig
+ if [ ! -f /home/xymon/server/ext/ignoreclient.py ]
+ then
+ echo "#this is a list of hosts to ignore" > /home/xymon/server/ext/ignoreclient.py
+ echo ignorehosts=\"\'ignoreme1\',\'ignoreme2\'\" >> /home/xymon/server/ext/ignoreclient.py
+ fi
+
+ if [ ! -f /data/srv/httpd/htdocs/failed_func_hosts ]
+ then
+ touch /data/srv/httpd/htdocs/failed_func_hosts
+ fi
+ chown nobody:nobody /data/srv/httpd/htdocs/failed_func_hosts
+ chmod 777 /data/srv/httpd/htdocs/failed_func_hosts
+
+ 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:nobody /home/xymon
+ chown -R nobody: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
+
+ chmod g+s /data/srv/httpd/htdocs/xymon/notes/
+ setfacl -d -m g::rw /data/srv/httpd/htdocs/xymon/notes/
+ setfacl -d -m u:nobody:rwx /data/srv/httpd/htdocs/xymon/notes/
+
+ file="/data/srv/httpd/htdocs/xymon/gifs/network.png"
+ if [ -f $file ]
+ then
+ setfacl -m u:nobody:rw $file
+ fi
+
+ setfacl -d -m u:nobody:rwx /data/srv/httpd/htdocs/xymon/gifs/
+
+ chmod g+s /home/xymon/etc
+ setfacl -d -m g::rw /home/xymon/etc/
+ setfacl -d -m u::rw /home/xymon/etc/
+ setfacl -d -m u:nobody:rwx /home/xymon/etc/
+
+ file="/home/xymon/etc/mythdot"
+ if [ -f $file ]
+ then
+ setfacl -m u:nobody:rw $file
+ fi
+
+ chown -R nobody /var/log/hobbit
+
+ chown root /home/xymon/server/bin/xymonping
+ chmod +s /home/xymon/server/bin/xymonping
+
+ #remove old mtc log files
+ rm -f /var/log/hobbit/mtc
+ rm -f /var/log/hobbit/mtc.1*
+
+ echo "Generate lighttpd include..."
+ gen_light_include.py
+ echo "Forcing a re-read of lighttpd's configuration file..."
+ sv hup /service/lighttpd
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ rm -f /data/srv/httpd/htdocs/xymon/index.html
+ echo "Generate lighttpd include..."
+ gen_light_include.py
+ echo "Forcing a re-read of lighttpd's configuration file..."
+ sv hup /service/lighttpd
+}
+
+pre_remove() {
+ /bin/true
+}
+op=$1
+shift
+$op $*
+# vim: ft=sh ts=2