Module: check_mk
Branch: master
Commit: 1b6655a2778ef1017c49f84512b5dd0228ef3cb2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b6655a2778ef1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 1 17:26:33 2017 +0100
Added missing enterprise edition werks to sites werk list
Change-Id: I3268acacc57ba2ca263074c6b5593b4b9970622b
---
.werks/.f12 | 1 +
Makefile | 2 +-
scripts/precompile-werks | 10 ++++++++++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/.f12 b/.werks/.f12
index 88fa005..e317cfd 100644
--- a/.werks/.f12
+++ b/.werks/.f12
@@ -4,3 +4,4 @@ SITE=${SITE:-$(omd sites --bare | head -n 1)}
sudo mkdir -p /omd/sites/$SITE/share/check_mk/werks/
make -C .. precompile-werks
sudo install -m 644 -g $SITE -o $SITE werks /omd/sites/$SITE/share/check_mk/werks/werks
+sudo omd restart $SITE apache
diff --git a/Makefile b/Makefile
index d5e2632..24d55d5 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@ check-binaries:
check: check-spaces check-permissions check-binaries check-version
precompile-werks:
- python -c "import cmk.werks ;
cmk.werks.write_precompiled_werks('.werks/werks',
cmk.werks.load_raw_files('.werks'))"
+ PYTHONPATH=. python scripts/precompile-werks
dist: mk-livestatus precompile-werks
@echo "Making $(DISTNAME)"
diff --git a/scripts/precompile-werks b/scripts/precompile-werks
new file mode 100644
index 0000000..f118567
--- /dev/null
+++ b/scripts/precompile-werks
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import os
+import cmk.werks
+
+werks = cmk.werks.load_raw_files('.werks')
+if os.path.exists('enterprise/.werks'):
+ werks.update(cmk.werks.load_raw_files('enterprise/.werks'))
+
+cmk.werks.write_precompiled_werks('.werks/werks', werks)