Skip to content

Commit 661db68

Browse files
committed
Update error messsage
1 parent 609cabe commit 661db68

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

install/upgrade/versions/1.8.0.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,18 @@ if [ "$MAIL_SYSTEM" = "exim4" ]; then
258258
chmod 640 /etc/exim4/srs.conf
259259
chown root:Debian-exim /etc/exim4/srs.conf
260260
cp /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf.template.staging
261-
patch /etc/exim4/exim4.conf.template.staging $HESTIA/install/upgrade/patch/3661-exim-srs-support.patch
262-
exim -C /etc/exim4/exim4.conf.template.staging
261+
patch /etc/exim4/exim4.conf.template.staging $HESTIA/install/upgrade/patch/3661-exim-srs-support.patch 2>&1
262+
exim -C /etc/exim4/exim4.conf.template.staging 2>&1
263263
if [ "$?" -ne 0 ]; then
264-
#add_upgrade_message "Unable to successfully aply the SRS update patch for Exim.\n If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template"
265-
"$BIN"/v-add-user-notification admin "Unable to apply patch to Exim config" 'Unable to successfully aply the SRS update patch for Exim.<br /> If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template'
264+
add_upgrade_message "Unable to successfully aply the SRS update patch for Exim.\n If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template"
265+
"$BIN"/v-add-user-notification admin "Unable to apply patch to Exim config" 'Unable to successfully apply the SRS update patch for Exim.<br /> If you use SMTP relay with the SRS feature use the exim config found in /usr/local/hestia/install/deb/exim/exim4.conf.4.95.template'
266266
sed -i "s/""$(grep -m 1 "Unable to apply patch to Exim config" "$HESTIA"/data/users/admin/notifications.conf | awk '{print $1}')""/NID='1'/" "$HESTIA"/data/users/admin/notifications.conf
267+
echo "[ ! ] Unable to apply SRS update patch for SMTP relay"
267268
else
268269
echo "[ * ] Update exim4.conf.template ..."
269270
cp /etc/exim4/exim4.conf.template.staging /etc/exim4/exim4.conf.template
270271
fi
271-
rm /etc/exim4/exim4.conf.template.staging
272+
rm /etc/exim4/exim4.conf.template.staging*
272273
else
273274
sed -i "s/SRS_SECRET = readfile{\/etc\/exim4\/srs.conf}/SRS_SECRET = \${readfile{\/etc\/exim4\/srs.conf}}/g" /etc/exim4/exim4.conf.template
274275
chown root:Debian-exim /etc/exim4/srs.conf

0 commit comments

Comments
 (0)