summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorivan <ivan>2004-05-10 11:10:58 +0000
committerivan <ivan>2004-05-10 11:10:58 +0000
commit4121477dde8c9400bf81023bea3e0d980b34bf91 (patch)
treee804525f58cb32840510a4c60b66291602c5b7a3 /bin
parent38606efd583311cff2703090d7c9e3de550522b1 (diff)
make postfix export commands configrable
Diffstat (limited to 'bin')
-rwxr-xr-xbin/postfix.export7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/postfix.export b/bin/postfix.export
index 64d9738..dbb08ce 100755
--- a/bin/postfix.export
+++ b/bin/postfix.export
@@ -99,7 +99,7 @@ foreach my $export ( @exports ) {
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- ssh("$user\@$machine", "newaliases");
+ ssh("$user\@$machine", $export->option('newaliases') || 'newaliases');
# ssh("$user\@$machine", "postfix reload");
$rsync->exec( {
@@ -107,8 +107,9 @@ foreach my $export ( @exports ) {
dest => "$user\@$machine:". $export->option('virtual'),
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- ssh("$user\@$machine", "postmap hash:/etc/postfix/virtual");
- ssh("$user\@$machine", "postfix reload");
+ ssh("$user\@$machine", $export->option('postmap')
+ || 'postmap hash:/etc/postfix/virtual');
+ ssh("$user\@$machine", $export->option('reload') || 'postfix reload');
}