Skip to content

Commit 5caad1e

Browse files
authored
Merge pull request hestiacp#4301 from sandroshu/patch-1
show database server port in notification email
2 parents d68276e + 596f025 commit 5caad1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/db.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ mysql_connect() {
7474
if [ "$notify" != 'no' ]; then
7575
email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \')
7676
subj="MySQL connection error on $(hostname)"
77-
echo -e "Can't connect to MySQL $HOST\n$(cat $mysql_out)" \
77+
echo -e "Can't connect to MySQL $HOST:$PORT\n$(cat $mysql_out)" \
7878
| $SENDMAIL -s "$subj" $email
7979
fi
8080
rm -f $mysql_out
@@ -147,7 +147,7 @@ psql_connect() {
147147
if [ "$notify" != 'no' ]; then
148148
email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \')
149149
subj="PostgreSQL connection error on $(hostname)"
150-
echo -e "Can't connect to PostgreSQL $HOST\n$(cat /tmp/e.psql)" \
150+
echo -e "Can't connect to PostgreSQL $HOST:$PORT\n$(cat /tmp/e.psql)" \
151151
| $SENDMAIL -s "$subj" $email
152152
fi
153153
echo "Error: Connection to $HOST failed"

0 commit comments

Comments
 (0)