Commit e3819e33 authored by Pascal Wiedenbeck's avatar Pascal Wiedenbeck
Browse files

Fix missing files and permissions

parent 56017fd0
Pipeline #56793 passed with stage
in 3 minutes and 56 seconds
# Dockerfile for icinga2 with icingaweb2
# https://github.com/jjethwa/icinga2
# Extended with influxdb feature
FROM debian:stretch
MAINTAINER Jordan Jethwa
......@@ -13,11 +10,6 @@ ENV APACHE2_HTTP=REDIRECT \
ICINGA2_FEATURE_GRAPHITE_HOST=graphite \
ICINGA2_FEATURE_GRAPHITE_PORT=2003 \
ICINGA2_FEATURE_GRAPHITE_URL=http://graphite \
ICINGA2_FEATURE_INFLUXDB=false \
ICINGA2_FEATURE_INFLUXDB_HOST=127.0.0.1 \
ICINGA2_FEATURE_INFLUXDB_PORT=8086 \
ICINGA2_FEATURE_INFLUXDB_DB=icinga2 \
ICINGA2_FEATURE_INFLUXDB_USER=icinga \
ICINGA2_USER_FULLNAME="Icinga2" \
ICINGA2_FEATURE_DIRECTOR="true" \
ICINGA2_FEATURE_DIRECTOR_KICKSTART="true" \
......@@ -32,12 +24,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \
curl \
dnsutils \
gnupg \
influxdb-client \
libdbd-mysql-perl \
libdigest-hmac-perl \
libnet-snmp-perl \
locales \
lsb-release \
mailutils \
mariadb-client \
mariadb-server \
netbase \
openssh-client \
php-curl \
php-ldap \
php-mysql \
......@@ -49,7 +45,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \
supervisor \
unzip \
wget \
libdbd-mysql-perl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
......@@ -110,8 +105,7 @@ RUN true \
&& chmod u+s,g+s \
/bin/ping \
/bin/ping6 \
/usr/lib/nagios/plugins/check_icmp \
&& chmod +x /opt/run
/usr/lib/nagios/plugins/check_icmp
EXPOSE 80 443 5665
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -2,8 +2,6 @@
. /opt/helpers
echo "=== 50-icinga2"
CNFSUFFIX=icinga2
mysql_cnf_init_section \
"${CNFSUFFIX}" \
......@@ -48,9 +46,7 @@ fi
#icinga2 API cert - regenerate new private key and certificate when running in a new container
if [ ! -f "/var/lib/icinga2/certs/$(hostname).key" ]; then
echo "=== start of icinga2 node setup --master"
icinga2 node setup --master
echo "=== end of icinga2 node setup --master"
fi
chfn -f "${ICINGA2_USER_FULLNAME}" nagios
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#!/bin/bash
set -e
: ${MYSQL_ROOT_PASSWORD?No MySQL Root password set}
mysql <<-END
GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' WITH GRANT OPTION;
END
echo "Please shutdown your container now and copy the MySQL datafolder to the new mariadb container."
#!/usr/bin/python2
import ConfigParser
import argparse
parser = argparse.ArgumentParser(description='Set values in ini-files.')
parser.add_argument('file', metavar='FILE', help='Filename of ini-file.')
parser.add_argument('section', metavar='SECTION', help='Section in your ini-file. Pass "" to have no section.')
parser.add_argument('option', metavar='OPTION', help='Option to process.')
parser.add_argument('value', metavar='VALUE', help='Value to set your option.')
args = parser.parse_args()
config = ConfigParser.ConfigParser()
config.read(args.file)
if not config.has_section(args.section):
config.add_section(args.section)
config.set(args.section, args.option, args.value)
config.write(open(args.file, 'w'))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment