refactor init_db call to a shell script

so we can use sed to edit it when executing functional tests in docker
with gitlab-ci
5 jobs for feature-s/packageless_docker in 5 minutes and 11 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test Tools
passed #139908
test_tools

00:00:05

 
  Test Unit
passed #139909
web
test_server_unit

00:00:15

 
  Test Functional
failed #139921
docker x86_64
test_server_functional

00:04:50

failed #139920
x86_64 docker
test_server_functional

00:02:29

failed #139910
docker x86_64
test_server_functional

00:00:37

 
Name Stage Failure
failed
test_server_functional Test Functional There is an unknown failure, please try again
Makefile:43: recipe for target 'functional_server' failed
make: *** [functional_server] Error 2
Stopping docker_reporter_1 ...
Stopping docker_nginx_1 ...
Stopping docker_workers_1 ...
Stopping docker_uwsgi_1 ...
Stopping docker_fuse_1 ...
Stopping docker_mysql_1 ...
Stopping docker_workers_1 ...
done Stopping docker_nginx_1 ... done Stopping docker_reporter_1 ... done Stopping docker_uwsgi_1 ... done Stopping docker_mysql_1 ... done Stopping docker_fuse_1 ... done ERROR: Job failed: exit status 1