- Significant documentation changes for 2.0.0beta0
[BackupPC.git] / configure.pl
index a544aaf..2761b34 100755 (executable)
@@ -461,6 +461,17 @@ $Conf{EMailAdminUserName} ||= $Conf{BackupPCUser};
 # Update various config parameters
 #
 
 # Update various config parameters
 #
 
+#
+# Guess $Conf{CgiURL}
+#
+if ( !defined($Conf{CgiURL}) ) {
+    if ( $Conf{CgiDir} =~ m{cgi-bin(/.*)} ) {
+       $Conf{CgiURL} = "'http://$Conf{ServerHost}/cgi-bin$1/BackupPC_Admin'";
+    } else {
+       $Conf{CgiURL} = "'http://$Conf{ServerHost}/cgi-bin/BackupPC_Admin'";
+    }
+}
+
 #
 # IncrFill should now be off
 #
 #
 # IncrFill should now be off
 #
@@ -642,7 +653,7 @@ sub ConfigParse
     my $comment = 1;
     my $allVars = {};
     while ( <C> ) {
     my $comment = 1;
     my $allVars = {};
     while ( <C> ) {
-        if ( /^\s*#/ ) {
+        if ( /^#/ ) {
             if ( $comment ) {
                 $out .= $_;
             } else {
             if ( $comment ) {
                 $out .= $_;
             } else {