Some scripts for reseting domtool state
[hcoop/domtool2.git] / scripts / domtool-publish
1 #!/bin/sh -e
2
3 case $1 in
4 apache)
5 /usr/bin/rsync --delete /var/domtool/vhosts/* /etc/apache2/vhosts/
6 /etc/init.d/apache2 reload
7 ;;
8 bind)
9 /usr/bin/rsync --delete /var/domtool/zones/* /etc/bind/zones/
10 /bin/cp /var/domtool/named.conf.local /etc/bind/
11 /etc/init.d/bind9 reload
12 ;;
13 exim)
14 /bin/cp /var/domtool/aliases /etc/
15 /bin/cp /var/domtool/aliases.default /etc/
16 /bin/cp /var/domtool/local_domains.cfg /etc/exim4/
17 /etc/init.d/exim4 reload
18 ;;
19 mailman)
20 /bin/cp /var/domtool/mailman.map /etc/mailman
21 /etc/init.d/mailman reload
22 ;;
23 *)
24 echo "Usage: domtool-publish [apache|bind|exim|mailman]"
25 ;;
26 esac