Hi, I tested the patch and it works great. This is is a critical functionality because it enables internet providers and distributions to install a preconfigured ownCloud. I think this should be in ownCloud 2 even at this very late point in time also because it is an isolated feature and doesn´t affect other parts.
So I hope that no one objects if we put this patch in ownCloud 2 Cheers Frank On 07.10.2011, at 14:19, Klaas Freitag wrote: > On Dienstag, 4. Oktober 2011 11:48:19 Frank Karlitschek wrote: > > Hey, > >> >> I think this is an important addition for ownCloud 2 because it´s a >> requirement for auto setup and it doesn´t interfere with the rest of >> ownCloud. But I would love to hear an opinion from another developer. :-) > For me it works awesome. > > The patch also looks good. Have you realised that it removes the unused > line > $installed_called = ... > ? > > I would vote for including it into owncloud 2 as its very useful. > > regards, > > Klaas > >> >> On 04.10.2011, at 11:02, Thomas Schmidt wrote: >>> Hi, I wrote a patch to enable an autosetup of owncloud: >>> >>> >>> diff --git a/index.php b/index.php >>> index 2ac3f6d..e72b427 100644 >>> --- a/index.php >>> +++ b/index.php >>> @@ -27,8 +27,16 @@ require_once('lib/base.php'); >>> >>> // Setup required : >>> $not_installed = !OC_Config::getValue('installed', false); >>> -$install_called = (isset($_POST['install']) AND >>> $_POST['install']=='true'); if($not_installed) { >>> + // Check for autosetup: >>> + $autosetup_file = OC::$SERVERROOT."/config/autoconfig.php"; >>> + if( file_exists( $autosetup_file )){ >>> + error_log("Autoconfig file found, setting up >>> owncloud..."); + include( $autosetup_file ); >>> + $_POST['install'] = 'true'; >>> + $_POST = array_merge ($_POST, $AUTOCONFIG); >>> + unlink($autosetup_file); >>> + } >>> >>> OC_Util::addScript('setup'); >>> require_once('setup.php'); >>> exit(); >>> >>> That will be useful when installing owncloud 'headless', for example by >>> using the new owncloud-admin script, or just copying the files over by >>> ftp and using it without opening a browser. >>> >>> It expects an autoconfig.php in the config directory which gets removed >>> after setup. A minimal example file looks like this: >>> >>> <?php >>> $AUTOCONFIG = array( >>> >>> "dbtype" => 'sqlite', >>> "directory" => "/space/workspace/owncloud/data", >>> "adminlogin" => "tom", >>> "adminpass" => "tom" >>> >>> ); >>> ?> >>> >>> >>> What do you think, should I commit this to the master branch, so it's >>> included in the release? >>> >>> Greetings >> >> Frank Karlitschek >> karlitsc...@kde.org >> >> >> _______________________________________________ >> Owncloud mailing list >> Owncloud@kde.org >> https://mail.kde.org/mailman/listinfo/owncloud > _______________________________________________ > Owncloud mailing list > Owncloud@kde.org > https://mail.kde.org/mailman/listinfo/owncloud Frank Karlitschek karlitsc...@kde.org _______________________________________________ Owncloud mailing list Owncloud@kde.org https://mail.kde.org/mailman/listinfo/owncloud