=== default user, password and db for your app ===
+
=== generate default user, password and db for your app ===
create the following file to generate the default password dbname and dbuser
create the following file to generate the default password dbname and dbuser
Line 132:
Line 132:
</syntaxhighlight>
</syntaxhighlight>
+
=== create and populate your db ===
+
Then, create a file in smeserver-mycontrib-1.0/root/etc/e-smith/templates/etc/e-smith/sql/init/80mycontrib.
−
Then, create a file in smeserver-mycontrib-1.0/root/etc/e-smith/templates/etc/e-smith/sql/init/80mycontrib<syntaxhighlight lang="perl">
+
This content will generate a new user and db into your mariadb server, when expanding the template and restarting service mysql.init <syntaxhighlight lang="perl">
{
{
my $db = $mycontrib{DbName} || 'mycontrib';
my $db = $mycontrib{DbName} || 'mycontrib';
Line 156:
Line 158:
}
}
−
</syntaxhighlight>
+
</syntaxhighlight>You can also add some line in there to populate the content of the database using a mysql dump. Pay attention to make it not to overwrite existing data ;)