Commit | Line | Data |
---|---|---|
27e20924 AC |
1 | #!/bin/sh -e |
2 | ||
5543e924 AC |
3 | redo_exim() { |
4 | /bin/echo -n "domainlist local_domains = " >/etc/exim4/conf.d/main/10_domtool-domains | |
5 | /bin/cat /var/domtool/local_domains.cfg >>/etc/exim4/conf.d/main/10_domtool-domains | |
6 | /bin/echo "" >>/etc/exim4/conf.d/main/10_domtool-domains | |
7 | /bin/echo -n "domainlist relay_to_domains = " >>/etc/exim4/conf.d/main/10_domtool-domains | |
8 | /bin/cat /var/domtool/relay_domains.cfg >>/etc/exim4/conf.d/main/10_domtool-domains | |
9 | /bin/echo "" >>/etc/exim4/conf.d/main/10_domtool-domains | |
10 | /bin/echo -n "domainlist mm_domains = " >>/etc/exim4/conf.d/main/10_domtool-domains | |
11 | /bin/cat /var/domtool/mailman_domains.cfg >>/etc/exim4/conf.d/main/10_domtool-domains | |
12 | /bin/echo "" >>/etc/exim4/conf.d/main/10_domtool-domains | |
13 | /etc/init.d/exim4 reload | |
14 | } | |
15 | ||
27e20924 AC |
16 | case $1 in |
17 | apache) | |
71ba8736 | 18 | /usr/bin/rsync -r --delete /var/domtool/vhosts/ /etc/apache2/vhosts/ |
35aca644 | 19 | /etc/init.d/apache2 reload |
27e20924 | 20 | ;; |
8e965b2d AC |
21 | apache-down) |
22 | /etc/init.d/apache2 stop | |
23 | ;; | |
24 | apache-undown) | |
71ba8736 | 25 | /usr/bin/rsync -r --delete /var/domtool/vhosts/ /etc/apache2/vhosts/ |
8e965b2d AC |
26 | /etc/init.d/apache2 start |
27 | ;; | |
27e20924 | 28 | bind) |
71ba8736 | 29 | /usr/bin/rsync -r --delete /var/domtool/zones/ /etc/bind/zones/ |
27e20924 | 30 | /bin/cp /var/domtool/named.conf.local /etc/bind/ |
35aca644 | 31 | /etc/init.d/bind9 reload |
27e20924 AC |
32 | ;; |
33 | exim) | |
34 | /bin/cp /var/domtool/aliases /etc/ | |
35 | /bin/cp /var/domtool/aliases.default /etc/ | |
5543e924 | 36 | redo_exim |
27e20924 AC |
37 | ;; |
38 | mailman) | |
39 | /bin/cp /var/domtool/mailman.map /etc/mailman | |
35aca644 | 40 | /etc/init.d/mailman reload |
5543e924 | 41 | redo_exim |
27e20924 | 42 | ;; |
08688401 | 43 | courier) |
2bc5ed22 AC |
44 | /bin/cat /etc/courier/userdb/* >/etc/courier/exim |
45 | /bin/chmod o-r /etc/courier/exim | |
46 | /usr/sbin/exim_dbmbuild /etc/courier/exim /etc/courier/exim.dat | |
47 | /bin/chgrp mail /etc/courier/exim.dat | |
48 | /bin/chmod o-r /etc/courier/exim.dat | |
49 | ;; | |
50 | smtplog) | |
51 | /bin/grep $2 /var/log/exim4/mainlog | |
08688401 | 52 | ;; |
27e20924 AC |
53 | *) |
54 | echo "Usage: domtool-publish [apache|bind|exim|mailman]" | |
55 | ;; | |
51be7da6 | 56 | esac |