summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-02-06 15:13:55 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-02-06 15:13:55 +0000
commitd33160ee0aeb11aaec474d52bee27be8b533c2ba (patch)
treeab60bb12c915bd26a2976c3dca44756d84f5a5f5
parente6792ed6adcb6858b1c79b93a9ad092e4862131c (diff)
downloaddrakwizard-d33160ee0aeb11aaec474d52bee27be8b533c2ba.tar
drakwizard-d33160ee0aeb11aaec474d52bee27be8b533c2ba.tar.gz
drakwizard-d33160ee0aeb11aaec474d52bee27be8b533c2ba.tar.bz2
drakwizard-d33160ee0aeb11aaec474d52bee27be8b533c2ba.tar.xz
drakwizard-d33160ee0aeb11aaec474d52bee27be8b533c2ba.zip
- add wait message
- use check_started
-rwxr-xr-xweb_wizard/Apache.pm46
1 files changed, 32 insertions, 14 deletions
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm
index 0f28559e..e25f4418 100755
--- a/web_wizard/Apache.pm
+++ b/web_wizard/Apache.pm
@@ -25,6 +25,7 @@ package MDK::Wizard::Apache;
use strict;
use common;
+use services;
use MDK::Wizard::Wizcommon;
use MDK::Wizard::Varspaceval;
@@ -141,12 +142,19 @@ available on your http server via http://www.yourserver.com/~user."), 70)), type
post => \&do_it,
next => 'end'
},
- end => {
- name => N("Congratulations") . "\n\n" .
- N("The wizard successfully configured your Intranet/Internet Web Server"),
- end => 1,
- next => 0
- },
+ end => {
+ name => N("Congratulations") . "\n\n" .
+ N("The wizard successfully configured your Intranet/Internet Web Server"),
+ end => 1,
+ next => 0
+ },
+ error_end => {
+ name => N("Failed"),
+ data => [ { label => N("Relaunch drakwizard, and try to change some parameters.") } ],
+ no_back => 1,
+ end => 1,
+ next => 0,
+ },
};
sub new {
@@ -222,6 +230,9 @@ sub chg_user_dir {
sub do_it {
$::testing and return;
+ my $in = 'interactive'->vnew('su', 'Apache');
+ my $w = $in->wait_message(N("Apache server"), N("Configuring your system as Apache server ..."));
+
my $file = "/etc/httpd/conf/commonhttpd.conf";
my $that = "localhost";
@@ -233,14 +244,21 @@ sub do_it {
$that .= " 127.0.0.1";
}
cp_af($file, $file.".orig");
- substInFile {
- if (m/^\s*<Directory.*>/s...m!^\s*</Directory>!s) {
- { s/^\s*Allow .*$/ Allow from $that\n/s }
- }
- } $file;
- chg_docroot();
- chg_user_dir();
- system("/etc/rc.d/init.d/httpd restart");
+ substInFile {
+ if (m/^\s*<Directory.*>/s...m!^\s*</Directory>!s) {
+ { s/^\s*Allow .*$/ Allow from $that\n/s }
+ }
+ } $file;
+ chg_docroot();
+ chg_user_dir();
+
+ if (services::is_service_running('httpd')) {
+ services::restart('httpd')
+ } else {
+ services::start('httpd')
+ }
+ undef $w;
+ check_started('httpd');
}
1;