create_summary_websites.sh: Add support for php 7.3
This commit is contained in:
parent
0cd0ab607c
commit
2cb485a8ef
@ -12,7 +12,7 @@ declare -a apache_vhost_dir_arr
|
|||||||
declare -a _all_vhost_files_arr
|
declare -a _all_vhost_files_arr
|
||||||
declare -a _all_document_root_dirs_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_53=0
|
||||||
declare -i number_websites_54=0
|
declare -i number_websites_54=0
|
||||||
@ -51,6 +51,7 @@ clean_up() {
|
|||||||
rm -f $_tmp_filename_php_70
|
rm -f $_tmp_filename_php_70
|
||||||
rm -f $_tmp_filename_php_71
|
rm -f $_tmp_filename_php_71
|
||||||
rm -f $_tmp_filename_php_72
|
rm -f $_tmp_filename_php_72
|
||||||
|
rm -f $_tmp_filename_php_73
|
||||||
rm -f $_tmp_filename_not_considered
|
rm -f $_tmp_filename_not_considered
|
||||||
rm -f $_tmp_filename_no_php_assigned
|
rm -f $_tmp_filename_no_php_assigned
|
||||||
exit $1
|
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 "Website; ;PHP Version; ;PHP Engine; ;Database; ;CMS; ;DocumentRoot; ;VHost file; ;Server Alias(es)" > $filename_php_72
|
||||||
echo ";" >> $filename_php_72
|
echo ";" >> $filename_php_72
|
||||||
|
|
||||||
|
_tmp_filename_php_73=$(mktemp)
|
||||||
|
filename_php_73="${DST_DIR_CSV}/WEBSITES_PHP_73.csv"
|
||||||
|
cat <<EOF > ${DST_PATH_PHP}/websites_php_73.php
|
||||||
|
<?php
|
||||||
|
header('Content-Type:application/csv ; charset=utf-8');
|
||||||
|
header("Content-Disposition: attachment; filename=\"$(basename $filename_php_73)\"");
|
||||||
|
header('Pragma: no-cache');
|
||||||
|
header('Expires: 0');
|
||||||
|
readfile("$filename_php_73");
|
||||||
|
?>
|
||||||
|
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)
|
_tmp_filename_not_considered=$(mktemp)
|
||||||
filename_not_considered="${DST_DIR_CSV}/VHOST_FILES_NOT_CONSIDERED.csv"
|
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
|
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
|
elif ! $_vhost_file_not_considered ; then
|
||||||
_redirect_site=""
|
_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)
|
_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_70 | sort >> $filename_php_70
|
||||||
cat $_tmp_filename_php_71 | sort >> $filename_php_71
|
cat $_tmp_filename_php_71 | sort >> $filename_php_71
|
||||||
cat $_tmp_filename_php_72 | sort >> $filename_php_72
|
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_not_considered | sort >> $filename_not_considered
|
||||||
cat $_tmp_filename_no_php_assigned | sort >> $filename_no_php_assigned
|
cat $_tmp_filename_no_php_assigned | sort >> $filename_no_php_assigned
|
||||||
|
|
||||||
@ -1037,6 +1060,11 @@ if [[ $number_websites_72 -gt 0 ]]; then
|
|||||||
<li><a href="websites_php_72.php">websites PHP v7.2</a>: $number_websites_72</li>
|
<li><a href="websites_php_72.php">websites PHP v7.2</a>: $number_websites_72</li>
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
if [[ $number_websites_73 -gt 0 ]]; then
|
||||||
|
cat <<EOF >> ${DST_PATH_PHP}/index.php
|
||||||
|
<li><a href="websites_php_73.php">websites PHP v7.3</a>: $number_websites_73</li>
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
cat <<EOF >> ${DST_PATH_PHP}/index.php
|
cat <<EOF >> ${DST_PATH_PHP}/index.php
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user