From 9436caead7e3036c319a4b3d535a0537ca5a7c02 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Tue, 17 Sep 2024 10:38:15 +0200 Subject: [PATCH] Move daemon start after so more computer setup can be added by children images (#500) * Move daemon start after so more computer setup can be added by children images * Rename to 90_start_aiida_daemon.sh in case where after daemon script required --- stack/base/before-notebook.d/40_prepare-aiida.sh | 3 --- stack/base/before-notebook.d/90_start_aiida_daemon.sh | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 stack/base/before-notebook.d/90_start_aiida_daemon.sh diff --git a/stack/base/before-notebook.d/40_prepare-aiida.sh b/stack/base/before-notebook.d/40_prepare-aiida.sh index d3d97643..48f4043f 100755 --- a/stack/base/before-notebook.d/40_prepare-aiida.sh +++ b/stack/base/before-notebook.d/40_prepare-aiida.sh @@ -80,6 +80,3 @@ else verdi storage migrate --force fi - -# Daemon will start only if the database exists and is migrated to the latest version. -verdi daemon start || echo "ERROR: AiiDA daemon is not running!" diff --git a/stack/base/before-notebook.d/90_start_aiida_daemon.sh b/stack/base/before-notebook.d/90_start_aiida_daemon.sh new file mode 100644 index 00000000..c3485a33 --- /dev/null +++ b/stack/base/before-notebook.d/90_start_aiida_daemon.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# This script is executed whenever the docker container is (re)started. +set -x + +export SHELL=/bin/bash + +# Daemon will start only if the database exists and is migrated to the latest version. +verdi daemon start || echo "ERROR: AiiDA daemon is not running!"