mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
owncloud test: Make use of a little cfg file to configure credentials.
This commit is contained in:
parent
9916abc072
commit
da32a9facf
@ -17,11 +17,26 @@ use strict;
|
||||
print "Hello, this is t1, a tester for csync with ownCloud.\n";
|
||||
|
||||
#
|
||||
# Adjust data as needed here:
|
||||
# Adjust data as needed here or better us a t1.cfg file with the following
|
||||
# content:
|
||||
# user => "joe",
|
||||
# passwd => "XXXXXX",
|
||||
# url => "http://localhost/oc/files/webdav.php"
|
||||
|
||||
my $owncloud = "http://localhost/oc/files/webdav.php/";
|
||||
my $user = "joe";
|
||||
my $passwd = 'XXXXX'; # Mind to be secure.
|
||||
|
||||
if( -r "./t1.cfg" ) {
|
||||
my %config = do 't1.cfg';
|
||||
$user = $config{user} if( $config{user} );
|
||||
$passwd = $config{passwd} if( $config{passwd} );
|
||||
$owncloud = $config{url} if( $config{url} );
|
||||
print "Read t1.cfg\n";
|
||||
}
|
||||
|
||||
$owncloud .= "/" unless( $owncloud =~ /\/$/ );
|
||||
|
||||
|
||||
print "Connecting to ownCloud at ". $owncloud ."\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user