mirror of
https://github.com/casjaysdevdocker/tftpd
synced 2025-10-14 02:02:13 -04:00
🗃️ Committing everything that changed 🗃️
Some checks failed
release-tag / release-image (push) Failing after 12m9s
Some checks failed
release-tag / release-image (push) Failing after 12m9s
rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/etc/docker/init.d/00-tftpd.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
16
rootfs/usr/local/etc/docker/init.d/00-tftpd.sh
Executable file → Normal file
16
rootfs/usr/local/etc/docker/init.d/00-tftpd.sh
Executable file → Normal file
@@ -31,6 +31,18 @@
|
||||
printf '%s\n' "# - - - Initializing tftpd - - - #"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SERVICE_NAME="tftpd"
|
||||
# Function to exit appropriately based on context
|
||||
__script_exit() {
|
||||
local exit_code="${1:-0}"
|
||||
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
||||
# Script is being sourced - use return
|
||||
return "$exit_code"
|
||||
else
|
||||
# Script is being executed - use exit
|
||||
exit "$exit_code"
|
||||
fi
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SCRIPT_NAME="$(basename "$0" 2>/dev/null)"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
@@ -326,7 +338,7 @@ __run_start_script() {
|
||||
__post_execute 2>"/dev/stderr" | tee -p -a "$LOG_DIR/init.txt" >/dev/null
|
||||
retVal=$?
|
||||
echo "Initializing $SCRIPT_NAME has completed"
|
||||
exit $retVal
|
||||
__script_exit $retVal
|
||||
else
|
||||
# ensure the command exists
|
||||
if [ ! -x "$cmd" ]; then
|
||||
@@ -533,4 +545,4 @@ if [ "$?" -ne 0 ] && [ -n "$EXEC_CMD_BIN" ]; then
|
||||
SERVICE_IS_RUNNING="false"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
exit $SERVICE_EXIT_CODE
|
||||
__script_exit $SERVICE_EXIT_CODE
|
||||
|
Reference in New Issue
Block a user