X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/988c0f6aa53b84f03848cf418a0006e9e2ca793b..8ca17b9a328732cac9ccd9e1c96c8d35777afe88:/scripts/domtool-publish diff --git a/scripts/domtool-publish b/scripts/domtool-publish index b9f6ffc..9eea020 100755 --- a/scripts/domtool-publish +++ b/scripts/domtool-publish @@ -40,8 +40,8 @@ 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 + /bin/chown root:bind /etc/bind/named.conf.local + /bin/chmod 644 /etc/bind/named.conf.local /etc/init.d/bind9 restart ;; exim) @@ -57,6 +57,12 @@ case $1 in redo_exim ;; courier) + VMAILDB=`domtool-config -path vmaildb` + if [ -z "$VMAILDB" ]; then + echo "domtool-config not found, not syncing courier vmail userdb" + exit 1 + fi + /usr/bin/rsync -r --delete ${VMAILDB}/ /etc/courier/userdb /usr/sbin/makeuserdb /bin/chown -R domtool.nogroup /etc/courier/userdb /bin/cat /etc/courier/userdb/* >/etc/courier/exim @@ -79,6 +85,11 @@ case $1 in /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 ;; *)