diff options
Diffstat (limited to 'web_wizard')
-rwxr-xr-x | web_wizard/Apache.pm | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm index 55a19bbe..91095ea2 100755 --- a/web_wizard/Apache.pm +++ b/web_wizard/Apache.pm @@ -41,7 +41,8 @@ my $o = { user_dir => '', shared_dir => '' }, - needed_rpm => [ ( $config->{ver} == 2 ? 'apache2' : 'apache') ] + needed_rpm => [ ( $config->{ver} == 2 ? 'apache2' : 'apache') ], + defaultimage => "$ENV{__WIZARD_HOME__}web_wizard/images/apache.png" }; $o->{pages} = { @@ -54,7 +55,6 @@ $o->{pages} = { config => { name => N('Web Server') . "\n\n" . N('Your server can act as a Web Server toward your internal network (intranet) and as a Web Server for the Internet.') . "\n\n" . N('Select the kind of Web service you want to activate:') . "\n\n" . N('Don\'t check any box if you don\'t want to activate your Web Server.'), data => [ - { label => '' }, { text => N('Enable the Web Server for the Intranet'), type => 'bool', val => \$o->{var}{web_internal} }, { text => N('Enable the Web Server for the Internet'), type => 'bool', val => \$o->{var}{web_external} }, ], @@ -69,7 +69,6 @@ $o->{pages} = { name => N('Modules :') . "\n\n" . N('* User module : allows users to have a directory in their home directories available on your http server via http://www.yourserver.com/~user, you will be asked for the name of this directory afterward.'), pre => sub { $o->{var}{user_mod} = is_last_user_mod()}, data => [ - { label => '' }, { text => N('Allows users to get a directory in their homes directories available on your http server via http://www.yourserver.com/~user.'), type => 'bool', val => \$o->{var}{user_mod} }, ], @@ -80,7 +79,6 @@ available on your http server via http://www.yourserver.com/~user.'), type => 'b name => N('Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user'), pre => sub { $o->{var}{user_dir} ||= 'public_html' }, data => [ - { label => '' }, { label => N('user http sub-directory : ~/'), help => N('Type the name of the directory users should create in their homes (whitout ~/) to get it available via http://www.yourserver.com/~user'), val => \$o->{var}{user_dir} }, ], next => 'ask_dir' @@ -89,7 +87,6 @@ available on your http server via http://www.yourserver.com/~user.'), type => 'b name => N('Type the path of the directory you want being the document root.'), pre => sub { $o->{var}{shared_dir} ||= $root }, data => [ - { label => '' }, { label => N('Document Root:'), val => \$o->{var}{shared_dir} }, ], post => \&check_dir, @@ -97,8 +94,9 @@ available on your http server via http://www.yourserver.com/~user.'), type => 'b }, error_in_dir => { name => N('Error.'), - data => [ { label => '' }, - { label => N('The path you entered does not exist.') } ], + data => [ + { label => N('The path you entered does not exist.') } + ], next => 'ask_dir' }, error => { @@ -114,11 +112,8 @@ available on your http server via http://www.yourserver.com/~user.'), type => 'b }, data => [ { label => N('Intranet web server:'), fixed_val => \$o->{var}{internal} }, - { label => '' }, { label => N('Internet web server:'), fixed_val => \$o->{var}{external} }, - { label => '' }, { label => N('Document root:'), fixed_val => \$o->{var}{shared_dir} }, - { label => '' }, { label => N('User directory:'), fixed_val => \$o->{var}{user_dir} }, ], post => \&do_it, @@ -127,7 +122,6 @@ available on your http server via http://www.yourserver.com/~user.'), type => 'b end => { name => N('Congratulation'), data => [ - { label => '' }, { label => N('The wizard successfully configured your Intranet/Internet Web Server') } ], end => 1, next => 0 @@ -144,7 +138,6 @@ sub new { if (/^\s*\#?\s*DocumentRoot\s+(.*)/) { close($FH); $root = $1; - print "ROOT $root\n"; last; } } @@ -191,7 +184,7 @@ sub is_last_user_mod { } sub get_user_dir { - my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf"); + my %conf = MDK::Wizard::Varspaceval->get("/etc/httpd/conf/commonhttpd.conf"); $conf{UserDir}; } @@ -214,7 +207,7 @@ sub chg_user_dir { } sub do_it { - $::DEBUG and return; + $::testing and return; my $file = "/etc/httpd/conf/commonhttpd.conf"; my $that = "localhost"; |