Added fixes for hestiacp for rpm installer

This commit is contained in:
Alexey Berezhok
2024-05-01 19:37:06 +03:00
parent d7ea7da070
commit d221337bbd
6 changed files with 108 additions and 11 deletions

View File

@@ -23,8 +23,12 @@ send_email_report() {
email=$(echo "$email" | cut -f 2 -d "'")
tmpfile=$(mktemp)
subj="$(hostname): $FTP_SYSTEM restart failed"
service "$FTP_SYSTEM" configtest >> $tmpfile 2>&1
service "$FTP_SYSTEM" restart >> $tmpfile 2>&1
if [ -f /etc/redhat-release ]; then
systemctl restart "$FTP_SYSTEM" >> $tmpfile 2>&1
else
service "$FTP_SYSTEM" configtest >> $tmpfile 2>&1
service "$FTP_SYSTEM" restart >> $tmpfile 2>&1
fi
cat $tmpfile | $SENDMAIL -s "$subj" $email
rm -f $tmpfile
}