File: //platform/bin/run-userini-parser-wrapper.sh
#!/bin/bash
#
# Wrapper script to run userini parser for FPM containers
#
RUN_USERINI_PARSER_SCRIPT="/usr/local/bin/run-userini-parser.sh"
# Check if task type should skip parser
if [[ "${NOMAD_TASK_NAME}" = "app-services-unit" ]]; then
echo "Task Name: ${NOMAD_TASK_NAME}"
echo "Skipping userini parser, not supported in app-services-unit task"
exit 0
fi
# Run the userini parser if executable
if [[ -x ${RUN_USERINI_PARSER_SCRIPT} ]]; then
echo "Running ${RUN_USERINI_PARSER_SCRIPT}"
${RUN_USERINI_PARSER_SCRIPT} || echo "Warning: userini parser exited with error code $?"
else
echo "${RUN_USERINI_PARSER_SCRIPT} does not exist or is not executable"
fi
exit 0