Skip to content
Snippets Groups Projects
Commit 6a73c975 authored by Gilles Filippini's avatar Gilles Filippini
Browse files

[feat] docker: add DEBUG_ENTRYPOINT variable

Boolean variable to enable `set -x` in the entrypoint script.
parent 9389b3ea
No related branches found
No related tags found
1 merge request!1380Docker entrypoint - fixes and error handling
#!/bin/sh #!/bin/sh
set -u set -u
home=/var/lib/duniter
config=/etc/duniter
home_default=$home/duniter_default
function boolean () { function boolean () {
echo "$1" | sed -E 's/^(true|yes|1)$/true/i' echo "$1" | sed -E 's/^(true|yes|1)$/true/i'
} }
DEBUG_ENTRYPOINT="$(boolean "${DEBUG_ENTRYPOINT:-false}")"
if [ "$DEBUG_ENTRYPOINT" = true ]; then
set -x
fi
home=/var/lib/duniter
config=/etc/duniter
home_default=$home/duniter_default
manual_config="$(boolean "${DUNITER_MANUAL_CONFIG:-false}")" manual_config="$(boolean "${DUNITER_MANUAL_CONFIG:-false}")"
auto_sync="$(boolean "${DUNITER_AUTO_SYNC:-false}")" auto_sync="$(boolean "${DUNITER_AUTO_SYNC:-false}")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment