From e1905cf3aa9f53f0c61426330e41880bbe90f3e3 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 19 Aug 2004 14:40:32 +0000 Subject: Add wrapper scripts for localmkpostfixvirtual. --- localmaildomainupdate | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 localmaildomainupdate (limited to 'localmaildomainupdate') 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 +# +# $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 +) -- cgit v1.2.3