3 # Alias: TCP port number for Apache
6 # Configure the TCP port used for the Shinken WebUI
7 # process of this site. This option is only useful if
8 # the CORE is set to "shinken" and WEBSERVER is set to "own".
10 # After changing this variable, the site-wide Apache webserver
15 # Scan for a free port number by looking at the
16 # configuration of the other sites...
17 PORT
=$
($OMD_ROOT/lib
/omd
/port_is_used SHINKEN_WEBUI_TCP_PORT
57767)
21 echo "(none)|([1-9][0-9]{0,5})|([a-zA-Z0-9\.\-]*:[1-9][0-9]{0,5})"
24 if [ "$2" = "none" ]; then
27 PORT
=$
($OMD_ROOT/lib
/omd
/port_is_used SHINKEN_WEBUI_TCP_PORT
$2)
28 if [ "$PORT" != "$2" ] ; then
29 echo "WebUI port $2 is in use. I've choosen $PORT instead." >&2
32 cat <<EOF > $OMD_ROOT/etc/shinken/apache.conf
33 # This file is managed by 'omd config set SHINKEN_WEBUI_TCP_PORT'.
34 # Better do not edit manually
35 <IfModule mod_alias.c>
36 <Location /$OMD_SITE/shinken>
38 RewriteCond %{ENV:REDIRECT_STATUS} !=501
39 RewriteCond $OMD_ROOT/lib/shinken/shinken/modules/webui_broker/__init__.py -f
40 RewriteRule ^/(.*) http://%{HTTP_HOST}:$PORT [last,redirect=301]
41 RewriteRule .* http://127.0.0.1/mi/gibts/ned [last,redirect=501]
42 ErrorDocument 501 "<h1>OMD: Shinken WebUI not available</h1>You are using a distribution where the Shinken WebUI feature has been deactivated because the built-in Python interpreter is too old.<br>In order to be correctly displayed with Internet Explorer, this message must be longer than 512 bytes. <br><br>Mir san vom Woid dahoam, des kennt a jeda glei,<br>wenns von de Berge hallt, dann samma mir dabei.<br>Und wenn as Stutzerl knallt, dann samma mir um d'Weg,<br> Mir san vom Woid dahoam, da Woid is sche.<br>Mir san af Straubing zua als lust'ge Bauernknecht,<br>Weil mir uns eibült ham, des war fir uns des recht.<br>Uns hods ned g'folln do draussd, ham miassn glei hoamgeh,<br>Mir san vom Woid dahoam, da Woid is sche."
49 [ "$CONFIG_CORE" = shinken
]