summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-05-06 22:29:25 +0000
committerivan <ivan>2004-05-06 22:29:25 +0000
commitc7105cfe8d064cf8924d5b814310e315ef5c1578 (patch)
treefd4eb72b9a8f4b357be4061d26b8a32a8cdcba22
parent1d4ff1d3b241a8e56a49e3a6cd83f7e46b96a446 (diff)
add option to change the restart command in apache exports
-rw-r--r--FS/FS/part_export/apache.pm3
-rwxr-xr-xbin/apache.export4
2 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/part_export/apache.pm b/FS/FS/part_export/apache.pm
index b16b3040d..17fbabff8 100644
--- a/FS/FS/part_export/apache.pm
+++ b/FS/FS/part_export/apache.pm
@@ -10,6 +10,9 @@ tie my %options, 'Tie::IxHash',
'user' => { label=>'Remote username', default=>'root' },
'httpd_conf' => { label=>'httpd.conf snippet location',
default=>'/etc/apache/httpd-freeside.conf', },
+ 'restart' => { label=>'Apache restart command',
+ default=>'apachectl graceful',
+ },
'template' => {
label => 'Template',
type => 'textarea',
diff --git a/bin/apache.export b/bin/apache.export
index f0a6beefc..47863a9d5 100755
--- a/bin/apache.export
+++ b/bin/apache.export
@@ -51,7 +51,9 @@ foreach my $export ( @exports ) {
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- ssh("root\@$machine", 'apachectl graceful');
+ my $restart = $export->option('restart') || 'apachectl graceful';
+
+ ssh("root\@$machine", $restart);
}