X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=configure.pl;h=2761b34727889aaf0dce0a8ad422b79985bdeb83;hp=a544aafd017e679a36ad65be95a08b7e5027e786;hb=2c6ebbdaeabadbda3af4bc7c748995215c045b82;hpb=3dc33e5f39430031766adf3c5bb2ffc649ee9100 diff --git a/configure.pl b/configure.pl index a544aaf..2761b34 100755 --- a/configure.pl +++ b/configure.pl @@ -461,6 +461,17 @@ $Conf{EMailAdminUserName} ||= $Conf{BackupPCUser}; # 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 # @@ -642,7 +653,7 @@ sub ConfigParse my $comment = 1; my $allVars = {}; while ( ) { - if ( /^\s*#/ ) { + if ( /^#/ ) { if ( $comment ) { $out .= $_; } else {