From 76147eb32cb4e3132034e0d0ebc581f5fdfaa17b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 11 Nov 2021 15:20:41 -0800 Subject: [PATCH] Handle case where var_directory changes --- setup.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.pl b/setup.pl index 3ec9fabf4..a267034b9 100755 --- a/setup.pl +++ b/setup.pl @@ -106,7 +106,7 @@ if (-r "$config_directory/config") { # We can now load the main Webmin library $ENV{'WEBMIN_CONFIG'} = $config_directory; -$ENV{'WEBMIN_VAR'} = "/var/webmin"; # not really used +$ENV{'WEBMIN_VAR'} = "/var/webmin"; # Only used for initial load of web-lib require "$srcdir/web-lib-funcs.pl"; # Check if upgrading from an old version @@ -199,6 +199,7 @@ else { mkdir($var_dir, 0755) || &errorexit("Failed to create directory $var_dir"); } + $ENV{'WEBMIN_VAR'} = $var_dir; print "\n"; # No need to ask where Perl is, because we already have it!