[omd-commits] OMD Git: omd: thruk: refresh cronjobs on update

git version control git at mathias-kettner.de
Fri Jun 22 10:01:41 CEST 2012


Module:   omd
Branch:   master
Commit:   d06f342f02c40bfde596c24885173ae76e57cbc9
URL:      http://omdistro.org/projects/omd/repository/revisions/d06f342f02c40bfde596c24885173ae76e57cbc9

Author:   Sven Nierlein <sven at nierlein.de>
Date:     Fri Jun 22 10:00:51 2012 +0200
Commiter: Sven Nierlein <sven at nierlein.de>
Date:     Fri Jun 22 10:00:51 2012 +0200

thruk: refresh cronjobs on update

---

 packages/thruk/THRUK.hook                          |   10 ++++++++++
 .../skel/tmp/thruk/{.gitignore => reports/.keep}   |    0
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/packages/thruk/THRUK.hook b/packages/thruk/THRUK.hook
new file mode 100755
index 0000000..e742759
--- /dev/null
+++ b/packages/thruk/THRUK.hook
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+case "$1" in
+    refresh)
+        if [ -e etc/cron.d/thruk.auto ]; then
+            newversion=$(basename $(readlink version))
+            sed -i etc/cron.d/thruk.auto -e "s|/omd/versions/[0-9\.]*/|/omd/versions/$newversion/|g" || echo "Updating Thruk Jobs Failed"
+        fi
+    ;;
+esac
diff --git a/packages/thruk/skel/tmp/thruk/.gitignore b/packages/thruk/skel/tmp/thruk/reports/.keep
similarity index 100%
rename from packages/thruk/skel/tmp/thruk/.gitignore
rename to packages/thruk/skel/tmp/thruk/reports/.keep



More information about the omd-commits mailing list