Skip to content
Snippets Groups Projects
Commit 58f91bc3 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '5591-remove-warnings' into 'master'

5591 remove warnings

See merge request !39
parents 44524f60 80c6710a
No related branches found
No related tags found
1 merge request!395591 remove warnings
Pipeline #1085 passed
# ======================================================================
#
# GENERATED BY docker/init.sh - template: ./templates/dot_env - e2cde05722688ff85d3a93e9cd55787e
# GENERATED BY init.sh - template: ./templates/dot_env - e2cde05722688ff85d3a93e9cd55787e
# values to be used in docker-composer.yml
#
# ======================================================================
......
#
# GENERATED BY docker/init.sh - template: ./templates/web-server-Dockerfile - 42dce773c83597a7d05af398bdd66d15
# GENERATED BY init.sh - template: ./templates/web-server-Dockerfile - 42dce773c83597a7d05af398bdd66d15
#
FROM php:8.1-apache
......
#
# GENERATED BY docker/init.sh - template: ./templates/vhost_app.conf - 9a9cf79de5a3584c0cef6cb79c339c25
# GENERATED BY init.sh - template: ./templates/vhost_app.conf - 9a9cf79de5a3584c0cef6cb79c339c25
#
......
;
; GENERATED BY docker/init.sh - template: ./templates/extra-php-config.ini - 80c23edaf568e2c36b9926fe2339e481
; GENERATED BY init.sh - template: ./templates/extra-php-config.ini - 80c23edaf568e2c36b9926fe2339e481
;
[PHP]
......
#
# GENERATED BY docker/init.sh - template: ./templates/docker-compose.yml - 97c88229bd2b5099544c013052b8d9c3
# GENERATED BY init.sh - template: ./templates/docker-compose.yml - 97c88229bd2b5099544c013052b8d9c3
#
# ======================================================================
#
......
......@@ -4,8 +4,9 @@
# DOCKER PHP DEV ENVIRONMENT :: INIT
#
# ----------------------------------------------------------------------
# 2021-11-nn <axel.hahn@iml.unibe.ch>
# 2022-07-19 <axel.hahn@iml.unibe.ch> support multiple dirs for setfacl
# 2021-11-nn v1.0 <axel.hahn@iml.unibe.ch>
# 2022-07-19 v1.1 <axel.hahn@iml.unibe.ch> support multiple dirs for setfacl
# 2022-07-19 v1.2 <www.axel-hahn.de> use docker-compose -p "$APP_NAME"
# ======================================================================
cd $( dirname $0 )
......@@ -14,6 +15,8 @@ cd $( dirname $0 )
# git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git
selfgitrepo="docker-php-starterkit.git"
_version="1.2"
# ----------------------------------------------------------------------
# FUNCTIONS
# ----------------------------------------------------------------------
......@@ -233,7 +236,7 @@ action=$1
while true; do
echo
echo -e "\e[32m===== INITIALIZER FOR APP [$APP_NAME] ===== \e[0m"
echo -e "\e[32m===== INITIALIZER FOR DOCKER APP [$APP_NAME] v$_version ===== \e[0m\n\r"
if [ -z "$action" ]; then
......@@ -282,7 +285,7 @@ while true; do
_wait
;;
u)
if docker-compose --verbose up -d --remove-orphans --build; then
if docker-compose -p "$APP_NAME" --verbose up -d --remove-orphans --build; then
# test ! -z "${APP_ONSTARTUP}" && sleep 2 && docker exec -it appmonitor-server /bin/bash -c "${APP_ONSTARTUP}"
echo "In a web browser:"
echo " $frontendurl"
......
......@@ -20,6 +20,7 @@
* 2021-10-27 <axel.hahn@iml.unibe.ch>
* 2022-07-05 <axel.hahn@iml.unibe.ch> send unknown if socket module is not activated.
* 2022-09-16 <axel.hahn@iml.unibe.ch> read error before closing socket.
* 2022-12-05 <axel.hahn@unibe.ch> add @ sign at socket functions to prevent warning
*
*/
class checkPortTcp extends appmonitorcheck{
......@@ -54,7 +55,7 @@ class checkPortTcp extends appmonitorcheck{
// from http://php.net/manual/de/sockets.examples.php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {
return [RESULT_UNKNOWN, "ERROR: $sHost:$iPort was not checked. socket_create() failed: " . socket_strerror(socket_last_error())];
}
......@@ -69,7 +70,7 @@ class checkPortTcp extends appmonitorcheck{
)
);
$result = socket_connect($socket, $sHost, $iPort);
$result = @socket_connect($socket, $sHost, $iPort);
if ($result === false) {
$aResult=[RESULT_ERROR, "ERROR: $sHost:$iPort failed. " . socket_strerror(socket_last_error($socket))];
socket_close($socket);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment