File tree Expand file tree Collapse file tree 7 files changed +92
-1
lines changed
Expand file tree Collapse file tree 7 files changed +92
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ 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+ 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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $CRON_SYSTEM restart failed"
46+ /etc/init.d/$CRON_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$CRON_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ if [ ! -z "$DNS_SYSTEM" ]; then
3434 if [ $? -ne 0 ]; then
3535 /etc/init.d/$DNS_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $DNS_SYSTEM restart failed"
46+ /etc/init.d/$DNS_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$DNS_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ 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+ 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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $FTP_SYSTEM restart failed"
46+ /etc/init.d/$FTP_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$FTP_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ 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+ 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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $MAIL_SYSTEM restart failed"
46+ /etc/init.d/$MAIL_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$MAIL_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ 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+ 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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $PROXY_SYSTEM restart failed"
46+ /etc/init.d/$PROXY_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$PROXY_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
Original file line number Diff line number Diff line change @@ -30,6 +30,19 @@ 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+ 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
38+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
39+ email=$( echo " $email " | cut -f 2 -d " '" )
40+ tmpfile=$( mktemp)
41+ subj=" $( hostname) : $service restart failed"
42+ /etc/init.d/$service configtest >> $tmpfile 2>&1
43+ /etc/init.d/$service restart >> $tmpfile 2>&1
44+ cat $tmpfile | $send_mail -s " $subj " $email
45+ rm -f $tmpfile
3346 exit $E_RESTART
3447 fi
3548fi
Original file line number Diff line number Diff line change 3131# Restart system
3232if [ ! -z " $WEB_SYSTEM " ]; then
3333 /etc/init.d/$WEB_SYSTEM reload > /dev/null 2>&1
34- if [ $? -ne 0 ]; then
34+ if [ " $? " -ne 0 ]; then
3535 /etc/init.d/$WEB_SYSTEM restart > /dev/null 2>&1
3636 if [ $? -ne 0 ]; then
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
42+ email=$( grep CONTACT $VESTA /data/users/admin/user.conf)
43+ email=$( echo " $email " | cut -f 2 -d " '" )
44+ tmpfile=$( mktemp)
45+ subj=" $( hostname) : $WEB_SYSTEM restart failed"
46+ /etc/init.d/$WEB_SYSTEM configtest >> $tmpfile 2>&1
47+ /etc/init.d/$WEB_SYSTEM restart >> $tmpfile 2>&1
48+ cat $tmpfile | $send_mail -s " $subj " $email
49+ rm -f $tmpfile
3750 exit $E_RESTART
3851 fi
3952 fi
You can’t perform that action at this time.
0 commit comments