fix_dhcprenew.sh 824 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ -e "/usr/bin/dhcprenew" ]; then
  3. mv /usr/bin/dhcprenew /usr/bin/dhcprenew.disabled
  4. # Notify admin via control panel
  5. rm /usr/local/vesta/data/users/admin/notifications.conf
  6. touch /usr/local/vesta/data/users/admin/notifications.conf
  7. /usr/local/vesta/bin/v-add-user-notification admin \
  8. "Security Check" "Your server was compromised please contact us at info@vestacp.com to get help."
  9. # Send email notification
  10. send_mail="/usr/local/vesta/web/inc/mail-wrapper.php"
  11. email=$(grep CONTACT /usr/local/vesta/data/users/admin/user.conf |cut -f2 -d \')
  12. if [ ! -z "$email" ]; then
  13. echo "Your server $(hostname) was compromised please contact us at info@vestacp.com to get help." |\
  14. $send_mail -s "SECURITY CHECK: Vesta Control Panel" $email
  15. fi
  16. fi