divmap.m4: Move descriptions over by a tab stop.
[exim-config] / Makefile
index fca5165..341208e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -94,17 +94,19 @@ OTHERHOSTS           = $(filter-out $(THISHOST), $(HOSTS))
 
 ROOT                    = sudo
 
-install/$(THISHOST): exim4-$(call host-mode,$(THISHOST)).conf
-       $(ROOT) install -m644 $< /etc/exim4/exim4.conf
-       $(ROOT) service exim4 reload
+install_rune            = \
+       exim4 -C/etc/exim4/exim4.conf.new -bV >/dev/null && \
+       mv /etc/exim4/exim4.conf.new /etc/exim4/exim4.conf && \
+       service exim4 reload
 
-show:
-       : $(addprefix install/, $(OTHERHOSTS))
+install/$(THISHOST): exim4-$(call host-mode,$(THISHOST)).conf
+       $(ROOT) cp $< /etc/exim4/exim4.conf.new
+       $(ROOT) sh -c '$(install_rune)'
 
 $(addprefix install/, $(OTHERHOSTS)): \
 install/%: exim4-$$(call host-mode,$$*).conf
-       $(ROOT) scp $< root@$*:/etc/exim4/exim4.conf
-       $(ROOT) ssh root@$* service exim4 reload
+       $(ROOT) scp $< root@$*:/etc/exim4/exim4.conf.new
+       $(ROOT) ssh root@$* '$(install_rune)'
 
 install: $(addprefix install/, $(HOSTS))