Browse Source

Small fixes due to mail notification changes.

Raphael Schneeberger 7 years ago
parent
commit
ac9d81ca6b
2 changed files with 14 additions and 20 deletions
  1. 7 10
      install/hst-install-debian.sh
  2. 7 10
      install/hst-install-ubuntu.sh

+ 7 - 10
install/hst-install-debian.sh

@@ -1477,25 +1477,21 @@ if [ "$host_ip" = "$ip" ]; then
 fi
 
 # Sending notification to admin email
-content=$(cat <<-END
-Congratulations, you have just successfully installed Hestia Control Panel!
-
+echo -e "Congratulations, you have just successfully installed \
+Hestia Control Panel
     https://$ip:$port
     username: admin
     password: $vpass
-
-We hope that you enjoy your installation of Hestia. Please
+We hope that you enjoy your installation of Hestia. Please \
 feel free to contact us anytime if you have any questions.
 Thank you.
-
 --
 Sincerely yours
 hestiacp.com team
-END
-)
+" > $tmpfile
 
 send_mail="$HESTIA/web/inc/mail-wrapper.php"
-echo $content | php $send_mail -s "Hestia Control Panel" $email
+cat $tmpfile | php $send_mail -s "Hestia Control Panel" $email
 
 # Congrats
 echo '======================================================='
@@ -1507,6 +1503,7 @@ echo ' |  _  |  __/\__ \ |_| | (_| | |___|  __/ '
 echo ' |_| |_|\___||___/\__|_|\__,_|\____|_|    '
 echo
 echo
-echo $content
+cat $tmpfile
+rm -f $tmpfile
 
 # EOF

+ 7 - 10
install/hst-install-ubuntu.sh

@@ -1425,25 +1425,21 @@ if [ "$host_ip" = "$ip" ]; then
 fi
 
 # Sending notification to admin email
-content=$(cat <<-END
-Congratulations, you have just successfully installed Hestia Control Panel!
-
+echo -e "Congratulations, you have just successfully installed \
+Hestia Control Panel
     https://$ip:$port
     username: admin
     password: $vpass
-
-We hope that you enjoy your installation of Hestia. Please
+We hope that you enjoy your installation of Hestia. Please \
 feel free to contact us anytime if you have any questions.
 Thank you.
-
 --
 Sincerely yours
 hestiacp.com team
-END
-)
+" > $tmpfile
 
 send_mail="$HESTIA/web/inc/mail-wrapper.php"
-echo $content | php $send_mail -s "Hestia Control Panel" $email
+cat $tmpfile | php $send_mail -s "Hestia Control Panel" $email
 
 # Congrats
 echo '======================================================='
@@ -1455,6 +1451,7 @@ echo ' |  _  |  __/\__ \ |_| | (_| | |___|  __/ '
 echo ' |_| |_|\___||___/\__|_|\__,_|\____|_|    '
 echo
 echo
-echo $content
+cat $tmpfile
+rm -f $tmpfile
 
 # EOF