Skip to content

Commit 70e2070

Browse files
committed
Misc: Add state file for health check to init script
1 parent 88a3687 commit 70e2070

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.docker/init.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
set -e
44

55
[ -z "${STORAGE_PATH}" ] && STORAGE_PATH="/usr/local/share/gvm/gsad/web/"
6+
[ -z "${STATE_FILE}" ] && STATE_FILE="/run/gsa/copying.done"
7+
8+
rm -f "${STATE_FILE}"
69

710
if [ -n "${MOUNT_PATH}" ]; then
811
if ! [ -d "${MOUNT_PATH}" ]; then
@@ -29,6 +32,10 @@ if [ -n "${MOUNT_PATH}" ]; then
2932
fi
3033
fi
3134

35+
STATE_DIR=$(dirname ${STATE_FILE})
36+
mkdir -p "${STATE_DIR}"
37+
touch "${STATE_FILE}"
38+
3239
if [ -n "${KEEP_ALIVE}" ]; then
3340
sleep infinity
3441
fi

0 commit comments

Comments
 (0)