mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-28 16:28:49 +01:00
Fixed warnings with file linkage
This commit is contained in:
parent
5c74f7c99a
commit
fbc9aa336c
@ -126,7 +126,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -134,7 +134,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -126,7 +126,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -134,7 +134,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -126,7 +126,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -134,7 +134,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -123,7 +123,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -131,7 +131,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -123,7 +123,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -131,7 +131,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -123,7 +123,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -131,7 +131,7 @@ prepare_web_server() {
|
||||
if [ -f "/etc/ssl/apache2/ssl.crt" ] && [ -f "/etc/ssl/apache2/ssl.key" ]; then
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -127,7 +127,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -135,7 +135,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -127,7 +127,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -135,7 +135,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -127,7 +127,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -135,7 +135,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -124,7 +124,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -132,7 +132,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -124,7 +124,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -132,7 +132,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -124,7 +124,7 @@ prepare_web_server() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -132,7 +132,7 @@ prepare_web_server() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
|
@ -116,7 +116,7 @@ configure_db_mysql() {
|
||||
fi
|
||||
|
||||
mkdir -p /var/run/mysqld
|
||||
ln -s /var/run/mysqld /run/mysqld
|
||||
ln -s /var/run/mysqld /run/mysqld 2>/dev/null
|
||||
chown -R mysql:mysql /var/run/mysqld
|
||||
chown -R mysql:mysql /run/mysqld
|
||||
|
||||
@ -545,7 +545,7 @@ prepare_web_server_apache() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache.conf" "$APACHE_SITES_DIR/zabbix.conf"
|
||||
if [ -f "/usr/sbin/a2dissite" ]; then
|
||||
/usr/sbin/a2ensite zabbix.conf 1>/dev/null
|
||||
fi
|
||||
@ -565,7 +565,7 @@ prepare_web_server_apache() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTPS)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/apache_ssl.conf" "$APACHE_SITES_DIR/zabbix_ssl.conf"
|
||||
if [ -f "/usr/sbin/a2dissite" ]; then
|
||||
/usr/sbin/a2ensite zabbix_ssl.conf 1>/dev/null
|
||||
fi
|
||||
@ -630,7 +630,7 @@ prepare_web_server_nginx() {
|
||||
|
||||
echo "** Adding Zabbix virtual host (HTTP)"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTP virtual host"
|
||||
fi
|
||||
@ -638,7 +638,7 @@ prepare_web_server_nginx() {
|
||||
if [ -f "$NGINX_SSL_CONFIG/ssl.crt" ] && [ -f "$NGINX_SSL_CONFIG/ssl.key" ] && [ -f "$NGINX_SSL_CONFIG/dhparam.pem" ]; then
|
||||
echo "** Enable SSL support for Nginx"
|
||||
if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then
|
||||
ln -s "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR"
|
||||
ln -sfT "$ZABBIX_ETC_DIR/nginx_ssl.conf" "$NGINX_CONFD_DIR/nginx_ssl.conf"
|
||||
else
|
||||
echo "**** Impossible to enable HTTPS virtual host"
|
||||
fi
|
||||
@ -647,11 +647,11 @@ prepare_web_server_nginx() {
|
||||
fi
|
||||
|
||||
if [ -d "/var/log/nginx/" ]; then
|
||||
ln -sf /dev/fd/2 /var/log/nginx/error.log
|
||||
ln -sfT /dev/fd/2 /var/log/nginx/error.log
|
||||
fi
|
||||
|
||||
ln -sf /dev/fd/2 /var/log/php5-fpm.log
|
||||
ln -sf /dev/fd/2 /var/log/php7.2-fpm.log
|
||||
ln -sfT /dev/fd/2 /var/log/php5-fpm.log
|
||||
ln -sfT /dev/fd/2 /var/log/php7.2-fpm.log
|
||||
}
|
||||
|
||||
stop_databases() {
|
||||
@ -876,7 +876,7 @@ prepare_zbx_web_config() {
|
||||
rm -f "/usr/share/zabbix/conf/zabbix.conf.php"
|
||||
fi
|
||||
|
||||
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
|
||||
ln -sfT "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
|
||||
|
||||
# Different places of PHP configuration file
|
||||
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user