I am using msmtp to send an email to my email address whenever my server is started and I'd like to make the server send an email when it shuts down as well. I've tried writing a simple script (the script itself works properly) and linking it to /etc/rc0.d
and /etc/rc6.d
, but without any effect. How can I properly exectue that script on shutdown?
#!/bin/sh
and the full path tomsmtp
needs to be specified.