adding export to read mailbox status information, RT#15987
[freeside.git] / FS / FS / part_export / apache.pm
1 package FS::part_export::apache;
2
3 use vars qw(@ISA %info);
4 use Tie::IxHash;
5 use FS::part_export::null;
6
7 @ISA = qw(FS::part_export::null);
8
9 tie my %options, 'Tie::IxHash',
10   'user'       => { label=>'Remote username', default=>'root' },
11   'httpd_conf' => { label=>'httpd.conf snippet location',
12                     default=>'/etc/apache/httpd-freeside.conf', },
13   'restart'    => { label=>'Apache restart command',
14                     default=>'apachectl graceful',
15                   },
16   'template'   => {
17     label   => 'Template',
18     type    => 'textarea',
19     default => <<'END',
20 <VirtualHost $zone> #generic
21 #<VirtualHost ip.addr> #preferred, http://httpd.apache.org/docs/dns-caveats.html
22 DocumentRoot /var/www/$zone
23 ServerName $zone
24 ServerAlias *.$zone
25 #BandWidthModule On
26 #LargeFileLimit 4096 12288
27 #FrontpageEnable on
28 </VirtualHost>
29
30 END
31   },
32   'template_inactive' => {
33     label   => 'Template (when suspended)',
34     type    => 'textarea',
35     default => <<'END',
36 <VirtualHost $zone> #generic
37 #<VirtualHost ip.addr> #preferred, http://httpd.apache.org/docs/dns-caveats.html
38 DocumentRoot /var/www/$zone
39 ServerName $zone
40 ServerAlias *.$zone
41 #BandWidthModule On
42 #LargeFileLimit 4096 12288
43 #FrontpageEnable on
44 Redirect 402 /
45 </VirtualHost>
46
47 END
48   },
49 ;
50
51 %info = (
52   'svc'     => 'svc_www',
53   'desc'    => 'Export an Apache httpd.conf file snippet.',
54   'options' => \%options,
55   'notes'   => <<'END'
56 Batch export of an httpd.conf snippet from a template.  Typically used with
57 something like <code>Include /etc/apache/httpd-freeside.conf</code> in
58 httpd.conf.  <a href="http://search.cpan.org/dist/File-Rsync">File::Rsync</a>
59 must be installed.  Run bin/apache.export to export the files.
60 END
61 );
62
63 1;
64