aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/install
diff options
context:
space:
mode:
Diffstat (limited to 'bin/install')
-rwxr-xr-xbin/install12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/install b/bin/install
index be4371b1..5b93e46e 100755
--- a/bin/install
+++ b/bin/install
@@ -1,14 +1,14 @@
1#!/usr/bin/php 1#!/usr/bin/php
2<?php 2<?php
3require_once __DIR__. '/../vendor/autoload.php';
4
5use Symfony\Component\Yaml\Yaml;
6
7$parameters = Yaml::parse(file_get_contents('app/config/parameters.yml'));
3 8
4echo 'Okay, you want to install wallabag, let\'s go!'; 9echo 'Okay, you want to install wallabag, let\'s go!';
5echo "\r\n"; 10echo "\r\n";
6 11
7function generateSalt() {
8 mt_srand(microtime(true)*100000 + memory_get_usage(true));
9 return md5(uniqid(mt_rand(), true));
10}
11
12function executeQuery($handle, $sql, $params) { 12function executeQuery($handle, $sql, $params) {
13 try 13 try
14 { 14 {
@@ -26,7 +26,7 @@ $configFile = 'app/config/config.inc.php';
26$dbFile = 'app/db/poche.sqlite'; 26$dbFile = 'app/db/poche.sqlite';
27$username = 'wallabag'; 27$username = 'wallabag';
28$password = 'wallabag'; 28$password = 'wallabag';
29$salt = generateSalt(); 29$salt = $parameters['parameters']['secret'];
30$defaultLanguage = 'en_EN.UTF8'; 30$defaultLanguage = 'en_EN.UTF8';
31 31
32if (!copy('app/config/config.inc.default.php', $configFile)) { 32if (!copy('app/config/config.inc.default.php', $configFile)) {