summaryrefslogtreecommitdiffstats
path: root/web_wizard/scripts/Webconf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'web_wizard/scripts/Webconf.pm')
-rw-r--r--web_wizard/scripts/Webconf.pm27
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";