Go to file
Alban Bronisz 7aaae9cd6d Doc 2021-12-15 11:48:01 +01:00
README.md Doc 2021-12-15 11:48:01 +01:00
example.msmtprc First version 2021-01-08 19:23:14 +00:00
msg.txt First version 2021-01-08 19:23:14 +00:00
warn-if-broken-url.sh Doc 2021-12-15 11:48:01 +01:00

README.md

Install

Install msmtp package:

sudo apt install msmtp

Configuration, see ubuntu-rf.org

Use

To add it to the cron tab:

sudo /etc/crontab

The add new line (to run the check once per hour), don't forget to change the username:

1 * * * *  username  /home/caracals/outils/warn-if-broken-url/warn-if-broken-url.sh > /dev/null  2>&1

Note:

  • Normaly cron send task outputs (echo) via mail. As the MTA (Mail Transfert Agent), may not be set up, the crontab line redirect the outputs into /dev/null.
  • Sudo is needed to update the crontab. It also possible to set up your user crontab with crontab -e. In this case, remove username from the cron entry.
  • The logs can be seen using (with sudo): sudo grep CRON /var/log/syslog