summaryrefslogtreecommitdiff
path: root/debian/local/sendmail.in
diff options
context:
space:
mode:
Diffstat (limited to 'debian/local/sendmail.in')
-rw-r--r--debian/local/sendmail.in24
1 files changed, 23 insertions, 1 deletions
diff --git a/debian/local/sendmail.in b/debian/local/sendmail.in
index b95baf7..b190c32 100644
--- a/debian/local/sendmail.in
+++ b/debian/local/sendmail.in
@@ -296,6 +296,8 @@ start_msp () {
start_sendmail () {
local result;
+ # Update databases
+ make_databases;
result=0;
start_mta || result=$?;
if check_msp; then
@@ -311,11 +313,13 @@ start_sendmail () {
#------------------------------------------------------------------------------
reload_mta () {
local result;
- result=0;
#
# Make sure @localstatedir@/run/sendmail/ exists
check_dirs;
#
+ # Update databases
+ make_databases;
+ #
# reload (signal -HUP) is *much* better/faster than stop/start
#
# Mark restarted for communication betwixt here and /etc/mail/Makefile
@@ -327,6 +331,7 @@ reload_mta () {
fi;
#
# Is running, must signal it...
+ result=0;
$SIGNAL_MTAL_CMD --signal HUP --oknodo --quiet || result=$?;
sleep 2;
chown $DAEMON_UID:smmta $MTAL_SOCKET;
@@ -957,6 +962,23 @@ daemon_check () {
};
#------------------------------------------------------------------------------
+#------------------------------------------------------------------------------
+# Simple routine to update the databases on start/refresh/restart
+#------------------------------------------------------------------------------
+make_databases () {
+ #
+ # Life is so much simpler with make
+ if test -x /usr/bin/make -a -f /etc/mail/Makefile; then
+ /usr/bin/make all -s -C /etc/mail >/dev/null;
+ #
+ # Here, all I could do would be handle a *few* database -
+ # quite frankly, it isn't worth it, someone will want yet another
+ else
+ echo "No make, you'll have to rebuild your databases by hand :(";
+ fi;
+ }
+#------------------------------------------------------------------------------
+
#------------------------------------------------------------------------------
# Clean sendmail queues (somewhat): does *not* support split qf/df/xf dirs.