From 2199c2a1f2a559be78713462dac3460d880d21ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristhian=20Mart=C3=ADnez=20Ochoa?= Date: Fri, 29 Apr 2022 10:40:56 -0600 Subject: [PATCH] verify timezone check added --- lib/verify | 6 ++++++ usr/webinoly | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/verify b/lib/verify index 06260ac..3ce2bb2 100644 --- a/lib/verify +++ b/lib/verify @@ -776,6 +776,12 @@ if [[ -z $critical_mode ]]; then local ver_six_war="1" fi fi + + # Check if timezone is set + if [[ -z $(conf_read timezone) ]] || ! grep -Fxq $(conf_read timezone) /opt/webinoly/lib/timezone.dat; then + echo "${dim}- [WARNING] Timezone is not set or not valid!${end}${red}" + local ver_six_war="1" + fi if [[ $ver_six_err == "1" ]]; then diff --git a/usr/webinoly b/usr/webinoly index e5f8fb3..bc7f383 100644 --- a/usr/webinoly +++ b/usr/webinoly @@ -88,7 +88,7 @@ elif [[ -n $timezone ]]; then if [[ $timezone == true ]]; then echo "${blu}${bol}" echo "Please, enter a valid Timezone for Ubuntu and PHP. ${end}" - echo "${blu}${dim}http://php.net/manual/en/timezones.php ${end}" + echo "${blu}${dim}https://www.php.net/manual/en/timezones.php ${end}" echo "" read -p "${blu}Timezone: ${end}" timezone echo ""