diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index 49a64222f..acef18f40 100644 --- a/agent/alpine/Dockerfile +++ b/agent/alpine/Dockerfile @@ -48,6 +48,7 @@ RUN apk update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-agent \ --enable-ipv6 \ --with-openssl && \ diff --git a/agent/alpine/run_zabbix_component.sh b/agent/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/agent/alpine/run_zabbix_component.sh +++ b/agent/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/agent/ubuntu/Dockerfile b/agent/ubuntu/Dockerfile index 156b58ee4..610f0ad21 100644 --- a/agent/ubuntu/Dockerfile +++ b/agent/ubuntu/Dockerfile @@ -55,6 +55,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-agent \ --enable-ipv6 \ --with-openssl && \ diff --git a/agent/ubuntu/run_zabbix_component.sh b/agent/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/agent/ubuntu/run_zabbix_component.sh +++ b/agent/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/java-gateway/alpine/Dockerfile b/java-gateway/alpine/Dockerfile index 1f9c2ce8d..3549c0f40 100644 --- a/java-gateway/alpine/Dockerfile +++ b/java-gateway/alpine/Dockerfile @@ -46,6 +46,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-java && \ make -j"$(nproc)" -s 1>/dev/null && \ mkdir -p /usr/sbin/zabbix_java/ && \ diff --git a/java-gateway/alpine/run_zabbix_component.sh b/java-gateway/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/java-gateway/alpine/run_zabbix_component.sh +++ b/java-gateway/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/java-gateway/ubuntu/Dockerfile b/java-gateway/ubuntu/Dockerfile index 290ae917a..7504c2f2b 100644 --- a/java-gateway/ubuntu/Dockerfile +++ b/java-gateway/ubuntu/Dockerfile @@ -53,6 +53,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-java && \ make -j"$(nproc)" -s 1>/dev/null && \ mkdir -p /usr/sbin/zabbix_java/ && \ diff --git a/java-gateway/ubuntu/run_zabbix_component.sh b/java-gateway/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/java-gateway/ubuntu/run_zabbix_component.sh +++ b/java-gateway/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index ca0342b62..6e6990f7a 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -73,6 +73,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-proxy \ --enable-ipv6 \ # Does not support stable iksemel library @@ -90,8 +91,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \ cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_proxy.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_proxy.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-proxy-${DB_TYPE}/ && \ cd /tmp/ && \ diff --git a/proxy-mysql/alpine/run_zabbix_component.sh b/proxy-mysql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/proxy-mysql/alpine/run_zabbix_component.sh +++ b/proxy-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/proxy-mysql/ubuntu/Dockerfile b/proxy-mysql/ubuntu/Dockerfile index 52b544e37..f916b08d9 100644 --- a/proxy-mysql/ubuntu/Dockerfile +++ b/proxy-mysql/ubuntu/Dockerfile @@ -81,6 +81,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-proxy \ --enable-ipv6 \ --with-jabber \ diff --git a/proxy-mysql/ubuntu/run_zabbix_component.sh b/proxy-mysql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/proxy-mysql/ubuntu/run_zabbix_component.sh +++ b/proxy-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index 3a97714d5..18f0ed9b9 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -69,6 +69,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-proxy \ --enable-ipv6 \ # Does not support stable iksemel library @@ -86,8 +87,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_proxy/zabbix_proxy /usr/sbin/zabbix_proxy && \ cp conf/zabbix_proxy.conf /etc/zabbix/zabbix_proxy.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_proxy.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_proxy.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cd /tmp/ && \ rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \ diff --git a/proxy-sqlite3/alpine/run_zabbix_component.sh b/proxy-sqlite3/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/proxy-sqlite3/alpine/run_zabbix_component.sh +++ b/proxy-sqlite3/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index 8624c0e68..065260ce3 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -79,6 +79,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-proxy \ --enable-ipv6 \ --with-jabber \ diff --git a/proxy-sqlite3/ubuntu/run_zabbix_component.sh b/proxy-sqlite3/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/proxy-sqlite3/ubuntu/run_zabbix_component.sh +++ b/proxy-sqlite3/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index 432f6099b..ffda57c2d 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -74,6 +74,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-server \ --enable-ipv6 \ # Does not support stable iksemel library @@ -91,8 +92,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \ cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_server.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_server.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ cp database/${DB_TYPE}/images.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ diff --git a/server-mysql/alpine/run_zabbix_component.sh b/server-mysql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/server-mysql/alpine/run_zabbix_component.sh +++ b/server-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/server-mysql/ubuntu/Dockerfile b/server-mysql/ubuntu/Dockerfile index c92fa68aa..8cf5e2d47 100644 --- a/server-mysql/ubuntu/Dockerfile +++ b/server-mysql/ubuntu/Dockerfile @@ -82,6 +82,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-server \ --enable-ipv6 \ --with-jabber \ diff --git a/server-mysql/ubuntu/run_zabbix_component.sh b/server-mysql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/server-mysql/ubuntu/run_zabbix_component.sh +++ b/server-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 8ee849c3c..ac9fc74eb 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -74,6 +74,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-server \ --enable-ipv6 \ # Does not support stable iksemel library @@ -91,8 +92,6 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ make -j"$(nproc)" -s 1>/dev/null && \ cp src/zabbix_server/zabbix_server /usr/sbin/zabbix_server && \ cp conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf && \ - sed -i -e "/^FpingLocation=/s/=.*/=\/usr\/sbin\/fping/" "/etc/zabbix/zabbix_server.conf" && \ - sed -i -e "/^Fping6Location=/s/=.*/=\/usr\/sbin\/fping6/" "/etc/zabbix/zabbix_server.conf" && \ chown --quiet -R zabbix:root /etc/zabbix && \ cp database/${DB_TYPE}/schema.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ cp database/${DB_TYPE}/images.sql /usr/share/doc/zabbix-server-${DB_TYPE}/ && \ diff --git a/server-pgsql/alpine/run_zabbix_component.sh b/server-pgsql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/server-pgsql/alpine/run_zabbix_component.sh +++ b/server-pgsql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/server-pgsql/ubuntu/Dockerfile b/server-pgsql/ubuntu/Dockerfile index 6dcbccb49..36b178cac 100644 --- a/server-pgsql/ubuntu/Dockerfile +++ b/server-pgsql/ubuntu/Dockerfile @@ -82,6 +82,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ --silent \ --sysconfdir=/etc/zabbix \ --libdir=/usr/lib/zabbix \ + --datadir=/usr/lib \ --enable-server \ --enable-ipv6 \ --with-jabber \ diff --git a/server-pgsql/ubuntu/run_zabbix_component.sh b/server-pgsql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/server-pgsql/ubuntu/run_zabbix_component.sh +++ b/server-pgsql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-apache-mysql/alpine/run_zabbix_component.sh b/web-apache-mysql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-apache-mysql/alpine/run_zabbix_component.sh +++ b/web-apache-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-apache-mysql/ubuntu/run_zabbix_component.sh b/web-apache-mysql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-apache-mysql/ubuntu/run_zabbix_component.sh +++ b/web-apache-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-nginx-mysql/alpine/run_zabbix_component.sh b/web-nginx-mysql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-nginx-mysql/alpine/run_zabbix_component.sh +++ b/web-nginx-mysql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-nginx-mysql/ubuntu/Dockerfile b/web-nginx-mysql/ubuntu/Dockerfile index 58ecb6e25..103c2c6d8 100644 --- a/web-nginx-mysql/ubuntu/Dockerfile +++ b/web-nginx-mysql/ubuntu/Dockerfile @@ -39,6 +39,8 @@ RUN DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CO ttf-dejavu-core 1>/dev/null && \ apt-get ${APT_FLAGS_COMMON} autoremove && \ apt-get ${APT_FLAGS_COMMON} clean && \ + mkdir -p /var/lib/php5 && \ + chown --quiet -R www-data:www-data /var/lib/php5 && \ rm -rf /var/lib/apt/lists/* ARG MAJOR_VERSION=3.0 diff --git a/web-nginx-mysql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini b/web-nginx-mysql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini index 88543ad2b..2ceb8be41 100644 --- a/web-nginx-mysql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini +++ b/web-nginx-mysql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini @@ -5,4 +5,4 @@ upload_max_filesize=2M max_input_time=300 always_populate_raw_post_date=-1 ; date.timezone=Europe/Riga -; session.save_path=/var/lib/php5 +session.save_path=/var/lib/php5 diff --git a/web-nginx-mysql/ubuntu/run_zabbix_component.sh b/web-nginx-mysql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-nginx-mysql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-mysql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-nginx-pgsql/alpine/run_zabbix_component.sh b/web-nginx-pgsql/alpine/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-nginx-pgsql/alpine/run_zabbix_component.sh +++ b/web-nginx-pgsql/alpine/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf ################################################# diff --git a/web-nginx-pgsql/ubuntu/Dockerfile b/web-nginx-pgsql/ubuntu/Dockerfile index 289b35a61..818af4192 100644 --- a/web-nginx-pgsql/ubuntu/Dockerfile +++ b/web-nginx-pgsql/ubuntu/Dockerfile @@ -39,6 +39,8 @@ RUN DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CO ttf-dejavu-core 1>/dev/null && \ apt-get ${APT_FLAGS_COMMON} autoremove && \ apt-get ${APT_FLAGS_COMMON} clean && \ + mkdir -p /var/lib/php5 && \ + chown --quite -R www-data:www-data /var/lib/php5 && \ rm -rf /var/lib/apt/lists/* ARG MAJOR_VERSION=3.0 diff --git a/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini b/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini index 88543ad2b..2ceb8be41 100644 --- a/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini +++ b/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d/99-zabbix.ini @@ -5,4 +5,4 @@ upload_max_filesize=2M max_input_time=300 always_populate_raw_post_date=-1 ; date.timezone=Europe/Riga -; session.save_path=/var/lib/php5 +session.save_path=/var/lib/php5 diff --git a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh index b51cfd088..fa26fa515 100755 --- a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh @@ -609,8 +609,22 @@ update_zbx_config() { update_config_var $ZBX_CONFIG "UnreachablePeriod" "${ZBX_UNREACHABLEPERIOD}" update_config_var $ZBX_CONFIG "UnavailableDelay" "${ZBX_UNAVAILABLEDELAY}" update_config_var $ZBX_CONFIG "UnreachableDelay" "${ZBX_UNREACHABLEDELAY}" - update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" - update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + + update_config_var $ZBX_CONFIG "AlertScriptsPath" "/usr/lib/zabbix/alertscripts" + update_config_var $ZBX_CONFIG "ExternalScripts" "/usr/lib/zabbix/externalscripts" + + # Possible few fping locations + if [ -f "/usr/bin/fping" ]; then + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/bin/fping" + else + update_config_var $ZBX_CONFIG "FpingLocation" "/usr/sbin/fping" + fi + if [ -f "/usr/bin/fping6" ]; then + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/bin/fping6" + else + update_config_var $ZBX_CONFIG "Fping6Location" "/usr/sbin/fping6" + fi + update_config_var $ZBX_CONFIG "SSHKeyLocation" "$ZABBIX_USER_HOME_DIR/ssh_keys" update_config_var $ZBX_CONFIG "LogSlowQueries" "${ZBX_LOGSLOWQUERIES}" @@ -888,6 +902,6 @@ clear_deploy "$zbx_type" echo "########################################################" echo "** Executing supervisord" -/usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf #################################################