@ -8,11 +8,16 @@ CONFIGFILE="$LOCATION/config.json"
monujo:code_init() {
monujo:code_init() {
local version="$1"
local version="$1" enforce_version="$2"
if [ -e "$LOCATION/.version" ] && \
if [ -e "$LOCATION/.version" ] && \
[ "$(cat "$LOCATION/.version")" == "$version" ]; then
[ "$(cat "$LOCATION/.version")" == "$version" ]; then
return 0
return 0
fi
fi
if [[ "${enforce_version,,}" =~ ^(false|0|no)$ ]]; then
if [ -d "$LOCATION" ]; then
return 0
fi
fi
[ -d "$LOCATION" ] && rm -rf "$LOCATION"
[ -d "$LOCATION" ] && rm -rf "$LOCATION"
mkdir -p "$LOCATION"
mkdir -p "$LOCATION"
cd "$LOCATION"
cd "$LOCATION"
@ -35,13 +40,20 @@ export MONUJO_OPTIONS=(
local-password-retention-time:numeric
local-password-retention-time:numeric
theme:struct\*
theme:struct\*
version:ignore
version:ignore
enforce-version:ignore
enforce-config:ignore
)
)
export MONUJO_OPTIONS_CONCAT=" ${MONUJO_OPTIONS[*]} "
export MONUJO_OPTIONS_CONCAT=" ${MONUJO_OPTIONS[*]} "
monujo:code_config_base() {
monujo:code_config_base() {
local service_def
local enforce_config="$1" service_def
if [[ "${enforce_config,,}" =~ ^(false|0|no)$ ]]; then
if [ -e "$CONFIGFILE" ]; then
return 0
fi
fi
service_def=$(get_compose_service_def "$SERVICE_NAME") || return 1
service_def=$(get_compose_service_def "$SERVICE_NAME") || return 1
options=$(e "$service_def" | shyaml get-value -y options) || true
options=$(e "$service_def" | shyaml get-value -y options) || true