Commit 58fc57c5 authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Factorise dash executable path generation in mariadb instance

parent 3ae90782
......@@ -15,11 +15,11 @@
# not need these here).
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum = 1e89de954d816b93f76d9b75820d192c
md5sum = af0ef3e5e3ca0a2671e5eb65eb3faea6
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = e8c5a6669c0d3b6f05065146a7fc40f0
md5sum = a99a56d0746303aecce5bbbcf2330dad
[template-kumofs]
filename = instance-kumofs.cfg.in
......
#!${:dash}
#!${dash:dash}
# DO NOT RUN THIS SCRIPT ON PRODUCTION INSTANCE
# OR MYSQL DATA WILL BE ERASED.
......
......@@ -16,6 +16,7 @@
{% else -%}
{% set ip = (ipv4_set | list)[0] -%}
{% endif -%}
{% set dash = parameter_dict['dash-location'] ~ '/bin/dash' %}
[publish]
recipe = slapos.cookbook:publish.serialised
......@@ -177,7 +178,7 @@ mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
# section is installed - so I only use jinja2 as a fancy way to write an
# executable file with partition-dependent but instance-parameters independent
# content.
template = inline:#!{{ parameter_dict['dash-location'] }}/bin/dash
template = inline:#!{{ dash }}
'{{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db' \
--defaults-file='${my-cnf:rendered}' \
--skip-name-resolve \
......@@ -252,13 +253,15 @@ mode = 644
template = {{ 'inline:{{ "${directory:mariadb-data}/**\\n" }}' }}
rendered = ${directory:srv}/exporter.exclude
[dash]
dash = {{ dumps(dash) }}
[resiliency-after-import-script]
# Generate after import script used by importer instance of webrunner
recipe = collective.recipe.template
input = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
output = ${directory:srv}/runner-import-restore
mode = 755
dash = {{ parameter_dict['dash-location'] }}/bin/dash
[promise]
recipe = slapos.cookbook:wrapper
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment