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