diff options
author | Jonas Smedegaard <dr@jones.dk> | 2004-08-19 14:40:32 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2004-08-19 14:40:32 +0000 |
commit | e1905cf3aa9f53f0c61426330e41880bbe90f3e3 (patch) | |
tree | 0d569257cd5d2ef867e45a7c62682b66607c8c9c /localmaildomainupdate | |
parent | bde2e9d3376052bfca07a449d6635383f4d7b38f (diff) |
Add wrapper scripts for localmkpostfixvirtual.
Diffstat (limited to 'localmaildomainupdate')
-rwxr-xr-x | localmaildomainupdate | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/localmaildomainupdate b/localmaildomainupdate new file mode 100755 index 0000000..544f0ae --- /dev/null +++ b/localmaildomainupdate @@ -0,0 +1,35 @@ +#!/bin/sh +# +# /usr/local/sbin/localmaildomainupdate +# Copyright 2004 Jonas Smedegaard <dr@jones.dk> +# +# $Id: localmaildomainupdate,v 1.1 2004-08-19 14:40:32 jonas Exp $ +# +# Update an (already prepared!) mailuser file +# +# (wrapper script for localmkpostfixvirtual) +# + +set -e + +if [ $# -ge 1 ]; then + maildomain="$1" + virtualfile="virtual.$1" + shift +else + maildomain="" + virtualfile="virtual" +fi + +( + cd /etc/postfix + diff $@ $virtualfile $virtualfile.new + echo -n "Above is the intended changes. OK to update (y/N)? " + read do_update + case $do_update in + y|Y) + mv $virtualfile.new $virtualfile + postmap $virtualfile + ;; + esac +) |