]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - bin/install
symfony is there
[github/wallabag/wallabag.git] / bin / install
index be4371b124528223130478a3184bd9e0f3c07550..5b93e46e3cd7bb06eba2e8ac00b695f5d59dda44 100755 (executable)
@@ -1,14 +1,14 @@
 #!/usr/bin/php
 <?php
+require_once __DIR__. '/../vendor/autoload.php';
+
+use Symfony\Component\Yaml\Yaml;
+
+$parameters = Yaml::parse(file_get_contents('app/config/parameters.yml'));
 
 echo 'Okay, you want to install wallabag, let\'s go!';
 echo "\r\n";
 
-function generateSalt() {
-    mt_srand(microtime(true)*100000 + memory_get_usage(true));
-    return md5(uniqid(mt_rand(), true));
-}
-
 function executeQuery($handle, $sql, $params) {
     try
     {
@@ -26,7 +26,7 @@ $configFile      = 'app/config/config.inc.php';
 $dbFile          = 'app/db/poche.sqlite';
 $username        = 'wallabag';
 $password        = 'wallabag';
-$salt            = generateSalt();
+$salt            = $parameters['parameters']['secret'];
 $defaultLanguage = 'en_EN.UTF8';
 
 if (!copy('app/config/config.inc.default.php', $configFile)) {