Currently I have a crontab
entry that does the following:
#!/bin/bash
/etc/init.d/sendmail stop
/etc/init.d/sendmail start
/usr/bin/newaliases
In the category of "learn something new every day", I just came across watch
(http://ss64.com/bash/watch.html), and am wondering how to implement the updating of the sendmail
aliases database via watching /etc/aliases
for changes, rather than just blindly bouncing smtpd
every day whether or not an update has occurred.
What is the right way of going about this, and should it still be run as a crontab
entry, or can it be more-or-less daemonized?