Line 110: |
Line 110: |
| == Mariadb myslq init == | | == Mariadb myslq init == |
| | | |
− | === 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 ;) |
| | | |
| == Systemd == | | == Systemd == |
Line 252: |
Line 254: |
| | | |
| </syntaxhighlight>you will also need the specific files created and accessible by www, that is done in the spec file for the permission and you need also to create them <syntaxhighlight lang="bash"> | | </syntaxhighlight>you will also need the specific files created and accessible by www, that is done in the spec file for the permission and you need also to create them <syntaxhighlight lang="bash"> |
− | mkdir -p smeserver-foo-1.0/root/var/lib/php/foo/{session,tmp,opcache) | + | mkdir -p smeserver-foo-1.0/root/var/lib/php/foo/{session,tmp,opcache} |
| mkdir -p smeserver-foo-1.0/root/var/log/php/foo | | mkdir -p smeserver-foo-1.0/root/var/log/php/foo |
| mkdir -p smeserver-foo-1.0/root/var/log/foo | | mkdir -p smeserver-foo-1.0/root/var/log/foo |
Line 318: |
Line 320: |
| Final step is to assemble your archive content, and build a rpm. This is quite similar to what you can see in [[Package Modification]] or [[Package Import]] | | Final step is to assemble your archive content, and build a rpm. This is quite similar to what you can see in [[Package Modification]] or [[Package Import]] |
| [[Category:Developer]] | | [[Category:Developer]] |
| + | [[Category:SME10-Development]] |