From 2772c898b111f990b376dca95c30c957c7015189 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 20 Nov 2013 13:13:27 +0100 Subject: [PATCH] Switch to MySQL in dl.php --- root/etc/e-smith/templates/etc/dl.php/50Database | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/root/etc/e-smith/templates/etc/dl.php/50Database b/root/etc/e-smith/templates/etc/dl.php/50Database index 09971b1..49bfa8e 100644 --- a/root/etc/e-smith/templates/etc/dl.php/50Database +++ b/root/etc/e-smith/templates/etc/dl.php/50Database @@ -1 +1,10 @@ -$dsn = "sqlite:$spoolDir/data.sql"; +{ +my $dbn = $dl{'DbName'} || 'dl'; +my $dbu = $dl{'DbUser'} || 'dl'; +my $dbp = $dl{'DbPassword'} || 'secret'; +$OUT .=<<"EOF" +\$dsn = "mysql:host=localhost;dbname=$dbn"; +\$dbUser = "$dbu"; +\$dbPassword = "$dbp"; +EOF +}