File tree Expand file tree Collapse file tree 8 files changed +41
-8
lines changed
Expand file tree Collapse file tree 8 files changed +41
-8
lines changed Original file line number Diff line number Diff line change 5353 subj=" $user → backup failed"
5454 email=$( grep CONTACT $VESTA /data/users/admin/user.conf | cut -f 2 -d \' )
5555fi
56- send_mail=" $VESTA /web/inc/mail-wrapper.php"
56+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
57+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
58+ else
59+ send_mail=$( which mail)
60+ fi
5761
5862# Check load average
5963la=$( cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d ' .' )
Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ if [ ! -z "$CRON_SYSTEM" ]; then
3434 if [ $? -ne 0 ]; then
3535 /etc/init.d/$CRON_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
37- send_mail=" $VESTA /web/inc/mail-wrapper.php"
37+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
38+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
39+ else
40+ send_mail=$( which mail)
41+ fi
3842 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3943 email=$( echo " $email " | cut -f 2 -d " '" )
4044 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ if [ ! -z "$FTP_SYSTEM" ]; then
3434 if [ $? -ne 0 ]; then
3535 /etc/init.d/$FTP_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
37- send_mail=" $VESTA /web/inc/mail-wrapper.php"
37+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
38+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
39+ else
40+ send_mail=$( which mail)
41+ fi
3842 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3943 email=$( echo " $email " | cut -f 2 -d " '" )
4044 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ if [ ! -z "$MAIL_SYSTEM" ]; then
3434 if [ $? -ne 0 ]; then
3535 /etc/init.d/$MAIL_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
37- send_mail=" $VESTA /web/inc/mail-wrapper.php"
37+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
38+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
39+ else
40+ send_mail=$( which mail)
41+ fi
3842 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3943 email=$( echo " $email " | cut -f 2 -d " '" )
4044 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
3434 if [ $? -ne 0 ]; then
3535 /etc/init.d/$PROXY_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
37- send_mail=" $VESTA /web/inc/mail-wrapper.php"
37+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
38+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
39+ else
40+ send_mail=$( which mail)
41+ fi
3842 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3943 email=$( echo " $email " | cut -f 2 -d " '" )
4044 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ check_args '1' "$#" 'SERVICE'
3030if [ -x " /etc/init.d/$service " ]; then
3131 /etc/init.d/$service restart > /dev/null 2>&1
3232 if [ $? -ne 0 ]; then
33- send_mail=" $VESTA /web/inc/mail-wrapper.php"
33+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
34+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
35+ else
36+ send_mail=$( which mail)
37+ fi
3438 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3539 email=$( echo " $email " | cut -f 2 -d " '" )
3640 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ if [ ! -z "$WEB_SYSTEM" ]; then
3434 if [ " $? " -ne 0 ]; then
3535 /etc/init.d/$WEB_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
37- send_mail=" $VESTA /web/inc/mail-wrapper.php"
37+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
38+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
39+ else
40+ send_mail=$( which mail)
41+ fi
3842 email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
3943 email=$( echo " $email " | cut -f 2 -d " '" )
4044 tmpfile=$( mktemp)
Original file line number Diff line number Diff line change @@ -62,7 +62,12 @@ is_backup_available
6262# ----------------------------------------------------------#
6363
6464# Define email wrapper
65- send_mail=" $VESTA /web/inc/mail-wrapper.php"
65+ if [ -e " $VESTA /web/inc/mail-wrapper.php" ]; then
66+ send_mail=" $VESTA /web/inc/mail-wrapper.php"
67+ else
68+ send_mail=$( which mail)
69+ fi
70+
6671
6772# Check user
6873check_user=$( is_object_valid ' user' ' USER' " $user " )
You can’t perform that action at this time.
0 commit comments