From 2cb485a8ef797584675aedb42d4291bd5dfe0fca Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 21 Jun 2019 03:23:22 +0200 Subject: [PATCH] create_summary_websites.sh: Add support for php 7.3 --- create_summary_websites.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/create_summary_websites.sh b/create_summary_websites.sh index 156a745..948974f 100755 --- a/create_summary_websites.sh +++ b/create_summary_websites.sh @@ -12,7 +12,7 @@ declare -a apache_vhost_dir_arr declare -a _all_vhost_files_arr declare -a _all_document_root_dirs_arr -PHP_VERIONS_SUPPORTED="5.3 5.4 5.5 5.6 7.0.7.1 7.2" +PHP_VERIONS_SUPPORTED="5.3 5.4 5.5 5.6 7.0.7.1 7.2 7.3" declare -i number_websites_53=0 declare -i number_websites_54=0 @@ -51,6 +51,7 @@ clean_up() { rm -f $_tmp_filename_php_70 rm -f $_tmp_filename_php_71 rm -f $_tmp_filename_php_72 + rm -f $_tmp_filename_php_73 rm -f $_tmp_filename_not_considered rm -f $_tmp_filename_no_php_assigned exit $1 @@ -316,6 +317,20 @@ EOF echo "Website; ;PHP Version; ;PHP Engine; ;Database; ;CMS; ;DocumentRoot; ;VHost file; ;Server Alias(es)" > $filename_php_72 echo ";" >> $filename_php_72 +_tmp_filename_php_73=$(mktemp) +filename_php_73="${DST_DIR_CSV}/WEBSITES_PHP_73.csv" +cat < ${DST_PATH_PHP}/websites_php_73.php + +EOF +echo "Website; ;PHP Version; ;PHP Engine; ;Database; ;CMS; ;DocumentRoot; ;VHost file; ;Server Alias(es)" > $filename_php_73 +echo ";" >> $filename_php_73 + _tmp_filename_not_considered=$(mktemp) filename_not_considered="${DST_DIR_CSV}/VHOST_FILES_NOT_CONSIDERED.csv" @@ -931,6 +946,13 @@ for _vhost_file in ${_all_vhost_files_arr[@]} ; do fi + if [[ "$_php_version" =~ ^7.3 ]]; then + echo "$_server_name;;$_php_version;;$_php_engine;;$database;;$site_cms;;$_documentroot;;$_vhost_file;;$server_aliases" >> $_tmp_filename_php_73 + + ((number_websites_73++)) + + fi + elif ! $_vhost_file_not_considered ; then _redirect_site="" _redirect_site=$(grep -E "^\s*RewriteRule" $_vhost_file 2> /dev/null | awk '{print$3}' | sed 's/"//g' | sed 's/\/$//' | sed 's/https\?:\/\///g' | sed 's/\$1//g' | sort -u) @@ -967,6 +989,7 @@ cat $_tmp_filename_php_56 | sort >> $filename_php_56 cat $_tmp_filename_php_70 | sort >> $filename_php_70 cat $_tmp_filename_php_71 | sort >> $filename_php_71 cat $_tmp_filename_php_72 | sort >> $filename_php_72 +cat $_tmp_filename_php_73 | sort >> $filename_php_73 cat $_tmp_filename_not_considered | sort >> $filename_not_considered cat $_tmp_filename_no_php_assigned | sort >> $filename_no_php_assigned @@ -1037,6 +1060,11 @@ if [[ $number_websites_72 -gt 0 ]]; then
  • websites PHP v7.2: $number_websites_72
  • EOF fi +if [[ $number_websites_73 -gt 0 ]]; then + cat <> ${DST_PATH_PHP}/index.php +
  • websites PHP v7.3: $number_websites_73
  • +EOF +fi cat <> ${DST_PATH_PHP}/index.php