From 11eaeebe7d98daa45e5e61703c2c10e15db9ad48 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 25 Dec 2011 16:38:35 -0600 Subject: supplemental-web: start/stop cgi scripts. Add an extra msg saying it's about to stop the service. --- abs/core/supplemental-web/PKGBUILD | 12 +++--------- abs/core/supplemental-web/cgi/bestart.cgi | 6 +++++- abs/core/supplemental-web/cgi/bestop.cgi | 6 +++++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/abs/core/supplemental-web/PKGBUILD b/abs/core/supplemental-web/PKGBUILD index 7c30873..ad10a79 100644 --- a/abs/core/supplemental-web/PKGBUILD +++ b/abs/core/supplemental-web/PKGBUILD @@ -1,15 +1,11 @@ pkgname=supplemental-web pkgver=1.0 -pkgrel=10 +pkgrel=12 arch=('i686') MVDIR=$startdir/pkg/usr/MythVantage -#BINDIR=$MVDIR/bin install=supplemental-web.install -#depends=(unclutter ghosd ncid func wol ) -#binfiles="saytime.sh backup_job restore_job.sh update_system update_system_all backend_control.sh grabkey.py notify.py" -#source=($binfiles mfegdbcommands.txt mbegdbcommands.txt 45-event.rules lighttpd-supplement.conf) backup=('extra.cfg.txt') -source=(lighttpd-supplement.conf extra.cfg.txt wakeonlan.sh backend_control.sh notify.py) +source=(lighttpd-supplement.conf extra.cfg.txt wakeonlan.sh backend_control.sh) depends=('lighttpd' 'php' 'fcgi' 'python' 'xymonserver' 'certmaster' 'func' 'python_aosd' ) @@ -23,7 +19,6 @@ build() { install -m755 -D wakeonlan.sh $MVDIR/bin/wakeonlan.sh install -m755 -D backend_control.sh $MVDIR/bin/backend_control.sh -# install -m755 -D notify.py $MVDIR/bin/notify.py mkdir -p $startdir/pkg/data/srv/httpd/htdocs/ cp -rp $startdir/contents/* $startdir/pkg/data/srv/httpd/htdocs chmod -R 755 $startdir/pkg/data/srv/httpd/htdocs @@ -40,5 +35,4 @@ build() { md5sums=('2a9d042467220fd1f74f5b12730c2e06' '3d8c7b430c1319d706ca420825918d2a' '81cdb6ee6804fa36366c6e259a80e7b4' - 'f37e10ef9fc84b384b9a2d41f82ef744' - '4da05325b4f9d61d26f88c19578d1950') + 'f37e10ef9fc84b384b9a2d41f82ef744') diff --git a/abs/core/supplemental-web/cgi/bestart.cgi b/abs/core/supplemental-web/cgi/bestart.cgi index 10ca4ad..e09e42b 100644 --- a/abs/core/supplemental-web/cgi/bestart.cgi +++ b/abs/core/supplemental-web/cgi/bestart.cgi @@ -1,5 +1,9 @@ #!/bin/bash -sudo /sbin/sv start mythbackend +# MESSAGE="Trying to start `hostname` B.E." +# /usr/bin/func "*" call msg display "$MESSAGE" & + +sudo /sbin/sv start mythbackend + MESSAGE="`hostname` B.E. started" /usr/bin/func "*" call msg display "$MESSAGE" & diff --git a/abs/core/supplemental-web/cgi/bestop.cgi b/abs/core/supplemental-web/cgi/bestop.cgi index a65a16a..c9d7fad 100644 --- a/abs/core/supplemental-web/cgi/bestop.cgi +++ b/abs/core/supplemental-web/cgi/bestop.cgi @@ -1,5 +1,9 @@ #!/bin/bash -sudo /sbin/sv stop mythbackend +MESSAGE="Trying to stop `hostname` B.E." +/usr/bin/func "*" call msg display "$MESSAGE" & + +sudo /sbin/sv stop mythbackend + MESSAGE="`hostname` B.E. stopped" /usr/bin/func "*" call msg display "$MESSAGE" & -- cgit v0.12 From 72fad9e7b6b5a4c090bc2af18ab50d4c28479ae0 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sun, 25 Dec 2011 16:42:09 -0600 Subject: xymon: change database backup location to /myth/system_backup. Also fix the generation of hbnotes for standalone. The webpage was missing the backup option --- abs/core/xymon/PKGBUILD | 4 ++-- abs/core/xymon/hbnotes.py | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index 5332ff5..2b18cdb 100644 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=xymon pkgname=(xymonserver xymonclient) pkgver=4.3.5 -pkgrel=26 +pkgrel=29 pkgdesc="Hobbit is a system for monitoring servers and networks. " license="GPL" arch=('i686' 'x86_64') @@ -118,7 +118,7 @@ md5sums=('31923ec126fe1c264fceb459d2175161' 'cc845b5aedc33dda8e3103b915fe4967' '650b523d879f32c1bad3b4a9e10e7c93' '093648dabb0d1da0fdcc37b327737f43' - '84f6b0db44e5142bb59aeabc7ea875af' + 'cac3478de106d875ddbdaa377d26692d' '6eb6ecdf33454f35b6c2409b863c816f' 'f6921f0413215ae174e81306be80d37f' 'be02f5d21373f97224ffa4727ec9718a' diff --git a/abs/core/xymon/hbnotes.py b/abs/core/xymon/hbnotes.py index 13dbd86..2a1b221 100644 --- a/abs/core/xymon/hbnotes.py +++ b/abs/core/xymon/hbnotes.py @@ -19,8 +19,8 @@ except: -def createdropdown(): - dir = "/data/database_backup" +def createdropdown(currenthostype): + dir = "/myth/system_backup" dropdown=" " #dropdown=''' #Restore database @@ -33,7 +33,8 @@ def createdropdown(): #dropdown+=' ' dropdown+='
Backup database
' dropdown+='Optimize database
' - dropdown+='Shutdown All Systems (expect MBE)
' + if currenthostype == "Master_backend": + dropdown+='Shutdown All Systems (expect MBE)
' #dropdown+='''Update All Systems