diff --git a/Dockerfile b/Dockerfile index 6474d45..20ba153 100644 --- a/Dockerfile +++ b/Dockerfile @@ -225,12 +225,17 @@ ADD rsyslog.init /etc/sv/rsyslog/run ADD start.sh /usr/local/bin/start_nagios RUN chmod +x /usr/local/bin/start_nagios -ADD fix-nagiosgraph-multiple-selection.sh /opt/nagiosgraph/etc +ADD nagiosgraph-mod/fix-nagiosgraph-multiple-selection.sh /opt/nagiosgraph/etc RUN cd /opt/nagiosgraph/etc && \ - sh fix-nagiosgraph-multiple-selection.sh + sh fix-nagiosgraph-multiple-selection.sh && \ + rm fix-nagiosgraph-multiple-selection.sh -RUN rm /opt/nagiosgraph/etc/fix-nagiosgraph-multiple-selection.sh +ADD nagiosgraph-mod/add-nagiosgraph-sidebar-links.sh /opt/nagios/share + +RUN cd /opt/nagios/share && \ + sh add-nagiosgraph-sidebar-links.sh && \ + rm add-nagiosgraph-sidebar-links.sh # enable all runit services RUN ln -s /etc/sv/* /etc/service diff --git a/nagiosgraph-mod/add-nagiosgraph-sidebar-links.sh b/nagiosgraph-mod/add-nagiosgraph-sidebar-links.sh new file mode 100755 index 0000000..d20577a --- /dev/null +++ b/nagiosgraph-mod/add-nagiosgraph-sidebar-links.sh @@ -0,0 +1,27 @@ +#!/bin/bash +################################################################# +# +# Author: Tomasz Matejunas tm@digitaloak.it digitaloak.it +# Description: Script adds nagiosgraph links (Stats section) +# to nagios sidebar +# +# Run script from nagios/share folder where +# is side.php script (this script will be modified) +# +################################################################## +sed ' +/<\/body>/ i\ +
+' side.php > side.php2 +rm side.php +mv side.php2 side.php \ No newline at end of file diff --git a/fix-nagiosgraph-multiple-selection.sh b/nagiosgraph-mod/fix-nagiosgraph-multiple-selection.sh similarity index 100% rename from fix-nagiosgraph-multiple-selection.sh rename to nagiosgraph-mod/fix-nagiosgraph-multiple-selection.sh