erp5: mariadb import script: abort if mariadb was not started.

parent 3a19dd7a
......@@ -150,7 +150,7 @@ context =
[mariadb-resiliency-after-import-script]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-import-script.sh.in
md5sum = 8db483ef7c3da79a1cb5ea07ba79a0ed
md5sum = a4738534a7e0e19af8a6e90e24029cf3
mode = 755
[template-mariadb]
......
......@@ -40,6 +40,11 @@ echo "Starting mariadb..."
# XXX hardcoded
$instance_directory/etc/run/mariadb &
mysqld_pid=$!
sleep 15
# If mysql has stopped, abort
if ! $(kill -0 $mysql_pid 2>/dev/null); then
exit 1
fi
$instance_directory/etc/run/mariadb_update > /dev/null 2>&1
echo "Importing data..."
......
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