2020-05-18

problem: apache2 crashing. fix by adding Restart=always into its systemd override file. systemctl edit apache2

 [Service]
 Restart=always

Add email notifications for apache2 restarts:

 vi /etc/systemd/system/notify-email@.service
 systemctl enable /etc/systemd/system/notify-email@.service
 and 
 systemctl edit apache2

and add

 [Unit]
 OnFailure=notify-email@%i.service

and

 systemctl daemon-reload

install mailutils

 apt install mailutils