add option to change the restart command in apache exports
authorivan <ivan>
Thu, 6 May 2004 22:29:24 +0000 (22:29 +0000)
committerivan <ivan>
Thu, 6 May 2004 22:29:24 +0000 (22:29 +0000)
FS/FS/part_export/apache.pm
bin/apache.export

index b16b304..17fbabf 100644 (file)
@@ -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', },
   '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',
   'template'   => {
     label   => 'Template',
     type    => 'textarea',
index f0a6bee..47863a9 100755 (executable)
@@ -51,7 +51,9 @@ foreach my $export ( @exports ) {
   } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
  # warn $rsync->out;
 
   } ) 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);
 
 }
 
 
 }