mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
refactoring: log_event(), is_format_valid()
This commit is contained in:
parent
325ca65f32
commit
a61a6e979e
52 changed files with 582 additions and 1170 deletions
|
@ -58,12 +58,11 @@ fi
|
|||
if [ "$restart" = 'yes' ]; then
|
||||
subj="OpenSSH restart failed"
|
||||
email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
|
||||
send_mail="$VESTA/web/inc/mail-wrapper.php"
|
||||
/usr/sbin/sshd -t >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
mail_text="OpenSSH can not be restarted. Please check config:
|
||||
\n\n$(/usr/sbin/sshd -t)"
|
||||
echo -e "$mail_text" | $send_mail -s "$subj" $email
|
||||
echo -e "$mail_text" |$SENDMAIL -s "$subj" $email
|
||||
else
|
||||
service ssh restart >/dev/null 2>&1
|
||||
service sshd restart >/dev/null 2>&1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue