mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Read configuration from /etc/ownCloud/t1.cfg
This commit is contained in:
parent
43345dc236
commit
b84253054a
1 changed files with 9 additions and 4 deletions
|
@ -82,8 +82,11 @@ sub initTesting(;$)
|
|||
{
|
||||
my ($prefix) = @_;
|
||||
|
||||
if( -r "./t1.cfg" ) {
|
||||
my %config = do 't1.cfg';
|
||||
my $cfgFile = "./t1.cfg";
|
||||
$cfgFile = "/etc/ownCloud/t1.cfg" if( -r "/etc/ownCloud/t1.cfg" );
|
||||
|
||||
if( -r "$cfgFile" ) {
|
||||
my %config = do $cfgFile;
|
||||
warn "Could not parse t1.cfg: $!\n" unless %config;
|
||||
warn "Could not do t1.cfg: $@\n" if $@;
|
||||
|
||||
|
@ -92,12 +95,14 @@ sub initTesting(;$)
|
|||
$owncloud = $config{url} if( $config{url} );
|
||||
$ld_libpath = $config{ld_libpath} if( $config{ld_libpath} );
|
||||
$csync = $config{csync} if( $config{csync} );
|
||||
print "Read t1.cfg: $config{url}\n";
|
||||
print "Read config from $cfgFile: $config{url}\n";
|
||||
} else {
|
||||
print STDERR "Could not read a config file $cfgFile\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$owncloud .= "/" unless( $owncloud =~ /\/$/ );
|
||||
|
||||
|
||||
print "Connecting to ownCloud at ". $owncloud ."\n";
|
||||
$d = HTTP::DAV->new();
|
||||
|
||||
|
|
Loading…
Reference in a new issue