@@ -575,44 +575,45 @@ if [ "$interactive" = 'yes' ]; then
575575 echo ' Goodbye'
576576 exit 1
577577 fi
578+ fi
578579
579- # Asking for contact email
580- if [ -z " $email " ]; then
581- while validate_email; do
582- echo -e " \nPlease use a valid emailadress (ex. info@domain.tld)."
583- read -p ' Please enter admin email address: ' email
584- done
585- else
580+ # Validate Email / Hostname even when interactive = no
581+ # Asking for contact email
582+ if [ -z " $email " ]; then
583+ while validate_email; do
584+ echo -e " \nPlease use a valid emailadress (ex. info@domain.tld)."
585+ read -p ' Please enter admin email address: ' email
586+ done
587+ else
586588 if validate_email; then
587- echo " Please use a valid emailadress (ex. info@domain.tld)."
588- exit 1
589- fi
590- fi
591-
592- # Asking to set FQDN hostname
593- if [ -z " $servername " ]; then
594- # Ask and validate FQDN hostname.
595- read -p " Please enter FQDN hostname [$( hostname -f) ]: " servername
596-
597- # Set hostname if it wasn't set
598- if [ -z " $servername " ]; then
599- servername=$( hostname -f)
600- fi
601-
602- # Validate Hostname, go to loop if the validation fails.
603- while validate_hostname; do
604- echo -e " \nPlease use a valid hostname according to RFC1178 (ex. hostname.domain.tld)."
605- read -p " Please enter FQDN hostname [$( hostname -f) ]: " servername
606- done
607- else
608- # Validate FQDN hostname if it is preset
609- if validate_hostname; then
610- echo " Please use a valid hostname according to RFC1178 (ex. hostname.domain.tld)."
611- exit 1
612- fi
589+ echo " Please use a valid emailadress (ex. info@domain.tld)."
590+ exit 1
613591 fi
614592fi
615593
594+ # Asking to set FQDN hostname
595+ if [ -z " $servername " ]; then
596+ # Ask and validate FQDN hostname.
597+ read -p " Please enter FQDN hostname [$( hostname -f) ]: " servername
598+
599+ # Set hostname if it wasn't set
600+ if [ -z " $servername " ]; then
601+ servername=$( hostname -f)
602+ fi
603+
604+ # Validate Hostname, go to loop if the validation fails.
605+ while validate_hostname; do
606+ echo -e " \nPlease use a valid hostname according to RFC1178 (ex. hostname.domain.tld)."
607+ read -p " Please enter FQDN hostname [$( hostname -f) ]: " servername
608+ done
609+ else
610+ # Validate FQDN hostname if it is preset
611+ if validate_hostname; then
612+ echo " Please use a valid hostname according to RFC1178 (ex. hostname.domain.tld)."
613+ exit 1
614+ fi
615+ fi
616+
616617# Generating admin password if it wasn't set
617618if [ -z " $vpass " ]; then
618619 vpass=$( gen_pass)
@@ -1910,6 +1911,20 @@ else
19101911 $HESTIA /bin/v-change-sys-api disable
19111912fi
19121913
1914+ # ----------------------------------------------------------#
1915+ # Configure File Manager #
1916+ # ----------------------------------------------------------#
1917+
1918+ echo " [ * ] Configuring File Manager..."
1919+ $HESTIA /bin/v-add-sys-filemanager quiet
1920+
1921+ # ----------------------------------------------------------#
1922+ # Configure PHPMailer #
1923+ # ----------------------------------------------------------#
1924+
1925+ echo " [ * ] Configuring PHPMailer..."
1926+ $HESTIA /bin/v-add-sys-phpmailer quiet
1927+
19131928
19141929# ----------------------------------------------------------#
19151930# Configure IP #
@@ -2048,13 +2063,6 @@ chmod 755 /backup/
20482063# create cronjob to generate ssl
20492064echo " @reboot root sleep 10 && rm /etc/cron.d/hestia-ssl && PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:' && /usr/local/hestia/bin/v-add-letsencrypt-host" > /etc/cron.d/hestia-ssl
20502065
2051- # ----------------------------------------------------------#
2052- # Configure File Manager #
2053- # ----------------------------------------------------------#
2054-
2055- echo " [ * ] Configuring File Manager..."
2056- $HESTIA /bin/v-add-sys-filemanager quiet
2057-
20582066# ----------------------------------------------------------#
20592067# Set hestia.conf default values #
20602068# ----------------------------------------------------------#
@@ -2084,13 +2092,6 @@ write_config_value "SERVER_SMTP_PASSWD" ""
20842092write_config_value " SERVER_SMTP_ADDR" " "
20852093write_config_value " POLICY_CSRF_STRICTNESS" " 1"
20862094
2087- # ----------------------------------------------------------#
2088- # Configure PHPMailer #
2089- # ----------------------------------------------------------#
2090-
2091- echo " [ * ] Configuring PHPMailer..."
2092- $HESTIA /bin/v-add-sys-phpmailer quiet
2093-
20942095# ----------------------------------------------------------#
20952096# Hestia Access Info #
20962097# ----------------------------------------------------------#
0 commit comments