You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"ERROR: v-add-sys-phpmailer can be run executed only by root user"
34
+
exit 10
35
+
fi
36
+
37
+
# Ensure that $HESTIA (/usr/local/hestia/) and other variables are valid.
38
+
if [ -z"$HESTIA" ];then
39
+
HESTIA="/usr/local/hestia"
40
+
fi
41
+
42
+
if [ -z"$HOMEDIR" ] || [ -z"$HESTIA_INSTALL_DIR" ];then
43
+
echo"ERROR: Environment variables not present, installation aborted."
44
+
exit 2
45
+
fi
46
+
47
+
# Ensure that Composer is installed for the user before continuing as it is a dependency of the PHPMailer.
48
+
if [ !-f"$COMPOSER_BIN" ];then
49
+
$BIN/v-add-user-composer "$user"
50
+
if [ $?-ne 0 ];then
51
+
$BIN/v-add-user-notification admin 'Composer installation failed!''<b>PHPMailer will not work without Composer.</b><br><br>Please try running the installer manually from a shell session:<br>v-add-sys-phpmailer<br><br>If this continues, open an issue report on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
52
+
exit 1
53
+
fi
54
+
fi
55
+
56
+
# Perform verification if read-only mode is enabled
# Check if installation was successful, if not abort script and throw error message notification and clean-up
71
+
if [ $?-ne 0 ];then
72
+
echo"ERROR: PHPMailer installation failed!"
73
+
echo"Please report this to our development team:"
74
+
echo"https://github.com/hestiacp/hestiacp/issues"
75
+
$BIN/v-add-user-notification admin 'PHPMailer installation failed!''Please report this to our development team on <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.'
0 commit comments