diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-09-30 15:47:00 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-09-30 15:47:00 +0000 |
commit | 038175ba788b43cb2656bd670fb062ff6f7b15c4 (patch) | |
tree | f5ac9eb729e241169a4c0959fbfb82d38686a2ba /web_wizard/scripts | |
parent | a268005176ec34c26aacf9a53f720dbf4e325ae3 (diff) | |
download | drakwizard-038175ba788b43cb2656bd670fb062ff6f7b15c4.tar drakwizard-038175ba788b43cb2656bd670fb062ff6f7b15c4.tar.gz drakwizard-038175ba788b43cb2656bd670fb062ff6f7b15c4.tar.bz2 drakwizard-038175ba788b43cb2656bd670fb062ff6f7b15c4.tar.xz drakwizard-038175ba788b43cb2656bd670fb062ff6f7b15c4.zip |
added user mod
Diffstat (limited to 'web_wizard/scripts')
-rw-r--r-- | web_wizard/scripts/Webconf.pm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/web_wizard/scripts/Webconf.pm b/web_wizard/scripts/Webconf.pm index cf9d9b55..4ea60b7d 100644 --- a/web_wizard/scripts/Webconf.pm +++ b/web_wizard/scripts/Webconf.pm @@ -1,7 +1,7 @@ #!/usr/bin/perl package Webconf; -require "__WIZ_HOME__/common/scripts/Vareqval.pm"; +require "__WIZ_HOME__/common/scripts/Varspaceval.pm"; require "__WIZ_HOME__/common/scripts/DrakconnectConf.pm"; use MDK::Common; @@ -45,6 +45,31 @@ sub chg_docroot { } "/etc/httpd/conf/commonhttpd.conf"; } +sub is_user_mod { + $ENV{wiz_user_mod}; +} + +sub get_user_dir { + my %conf = Varspaceval->get("/etc/httpd/conf/commonhttpd.conf"); + $conf{UserDir}; +} + +sub chg_user_dir { + my $root = get_user_dir(); + substInFile { + s|(\s*)UserDir\s*$root(/?)|$1UserDir $ENV{wiz_user_dir}$2|g; + } "/etc/httpd/conf/commonhttpd.conf"; + if ($ENV{wiz_user_dir} !~ /\s*disabled\s*/) { + substInFile { + s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; + } "/etc/httpd/conf/httpd.conf"; + substInFile { + s|(/home/\*/)$root(/?)|$1$ENV{wiz_user_dir}$2|g; + } "/etc/httpd/conf/commonhttpd.conf"; + } + 10; +} + sub do_it { my $file = "/etc/httpd/conf/commonhttpd.conf"; my $that = "localhost"; |