diff --git a/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh b/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh index c0646fb..afdc84f 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-mysqld.sh @@ -172,6 +172,8 @@ __execute_prerun() { # Setup /config directories __init_config_etc + # Define other actions/commands + } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Run any pre-execution checks @@ -537,6 +539,9 @@ root_user_pass="$(eval echo "${ENV_ROOT_USER_PASS:-$root_user_pass}")" [ -d "$LOG_DIR" ] || mkdir -p "$LOG_DIR" [ -d "$RUN_DIR" ] || mkdir -p "$RUN_DIR" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# pre-run function +__execute_prerun +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # create user if needed __create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -546,8 +551,6 @@ __set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} # Create base directories __setup_directories # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__execute_prerun -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # set switch user command __switch_to_user # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/init.d/05-nginx.sh b/rootfs/usr/local/etc/docker/init.d/05-nginx.sh index 1e86b37..175a27e 100755 --- a/rootfs/usr/local/etc/docker/init.d/05-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/05-nginx.sh @@ -172,6 +172,8 @@ __execute_prerun() { # Setup /config directories __init_config_etc + # Define other actions/commands + } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Run any pre-execution checks @@ -508,6 +510,9 @@ root_user_pass="$(eval echo "${ENV_ROOT_USER_PASS:-$root_user_pass}")" [ -d "$LOG_DIR" ] || mkdir -p "$LOG_DIR" [ -d "$RUN_DIR" ] || mkdir -p "$RUN_DIR" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# pre-run function +__execute_prerun +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # create user if needed __create_service_user "$SERVICE_USER" "$SERVICE_GROUP" "${WORK_DIR:-/home/$SERVICE_USER}" "${SERVICE_UID:-}" "${SERVICE_GID:-}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -517,8 +522,6 @@ __set_user_group_id $SERVICE_USER ${SERVICE_UID:-} ${SERVICE_GID:-} # Create base directories __setup_directories # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__execute_prerun -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # set switch user command __switch_to_user # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -