mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
Multiple changes for RHEL 7support
This commit is contained in:
parent
a719b6d4d4
commit
b978e72977
8 changed files with 50 additions and 53 deletions
|
@ -19,8 +19,8 @@ send_email_report() {
|
|||
email=$(echo "$email" | cut -f 2 -d "'")
|
||||
tmpfile=$(mktemp)
|
||||
subj="$(hostname): $PROXY_SYSTEM restart failed"
|
||||
/etc/init.d/$PROXY_SYSTEM configtest >> $tmpfile 2>&1
|
||||
/etc/init.d/$PROXY_SYSTEM restart >> $tmpfile 2>&1
|
||||
service $PROXY_SYSTEM configtest >> $tmpfile 2>&1
|
||||
service $PROXY_SYSTEM restart >> $tmpfile 2>&1
|
||||
cat $tmpfile | $send_mail -s "$subj" $email
|
||||
rm -f $tmpfile
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
|
|||
fi
|
||||
|
||||
# Restart system
|
||||
/etc/init.d/$PROXY_SYSTEM restart >/dev/null 2>&1
|
||||
service $PROXY_SYSTEM restart >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
send_email_report
|
||||
echo "Error: $PROXY_SYSTEM restart failed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue