Add mccarthy as admin web server and mail node
[hcoop/domtool2.git] / scripts / domtool-publish
index 3dce23a..9a9a01a 100755 (executable)
@@ -40,23 +40,25 @@ case $1 in
                /usr/bin/rsync -r --delete /var/domtool/zones/ /etc/bind/zones/
                /bin/chown -R bind /etc/bind/zones
                /bin/cp /var/domtool/named.conf.local /etc/bind/
-               /bin/chown root:bind_config /etc/bind/named.conf.local
-               /bin/chmod u=rw,g=rw,o=r /etc/bind/named.conf.local
-               /etc/init.d/bind9 reload
+               /bin/chown root:bind /etc/bind/named.conf.local
+               /bin/chmod 644 /etc/bind/named.conf.local
+               /etc/init.d/bind9 restart
        ;;
        exim)
                /bin/cp /var/domtool/aliases /etc/aliases.hosted
-               #/bin/cp /var/domtool/aliases.default /etc/
+               /bin/cp /var/domtool/aliases.default /etc/aliases.wildcard
                redo_exim
        ;;
        mailman)
-               /bin/cp /var/domtool/mailman.map /etc/mailman
+                /bin/echo "HCOOP_VHOSTS = {" >/etc/mailman/vhosts_cfg.py
+               /bin/cat /var/domtool/mailman.map >>/etc/mailman/vhosts_cfg.py
+                /bin/echo "}" >>/etc/mailman/vhosts_cfg.py
                /etc/init.d/mailman reload
                redo_exim
        ;;
        courier)
                /usr/sbin/makeuserdb
-               /bin/chown -R domtool.domtool /etc/courier/userdb
+               /bin/chown -R domtool.nogroup /etc/courier/userdb
                /bin/cat /etc/courier/userdb/* >/etc/courier/exim
                /bin/chmod o-r /etc/courier/exim
                /usr/sbin/exim_dbmbuild /etc/courier/exim /etc/courier/exim.dat
@@ -67,12 +69,24 @@ case $1 in
                /bin/grep $2 /var/log/exim4/mainlog
        ;;
         apache-fixperms)
-                /bin/chown -R domtool.domtool /var/log/apache2/user
+                /bin/chown -R domtool.nogroup /var/log/apache2/user
         ;;
         apache1.3-fixperms)
-                /bin/chown -R domtool.domtool /var/log/apache/user
+                /bin/chown -R domtool.nogroup /var/log/apache/user
         ;;
+        users)
+                /bin/cp /var/domtool/waklog.conf /etc/apache2/
+               /etc/init.d/apache2 reload
+        ;;
+        firewall)
+              # Ideally this would check if the config worked first
+              # (ferm failing just uses the previous config at
+              # least). Does it need to chown/chmod the generated
+              # rules?
+              /bin/cp /var/domtool/firewall/*.conf /etc/ferm/
+              /etc/init.d/ferm reload
+       ;;
        *)
-               echo "Usage: domtool-publish [apache|bind|courier|exim|mailman|smtplog STRING]"
+               echo "Usage: domtool-publish [apache|bind|courier|exim|mailman|smtplog STRING|users|firewall]"
        ;;
 esac