🗃️ Committing everything that changed 🗃️
Some checks failed
release-tag / release-image (push) Failing after 25s

rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/zz-code.sh
This commit is contained in:
casjay
2025-09-20 06:38:56 -04:00
parent 282560af53
commit 87d299b755
2 changed files with 69 additions and 17 deletions

14
rootfs/usr/local/etc/docker/init.d/zz-code.sh Executable file → Normal file
View File

@@ -28,6 +28,18 @@ SERVICE_UID="0" # set the user id
SERVICE_USER="x11user" # execute command as another user
SERVICE_PORT="" # port which service is listening on
EXEC_CMD_BIN="code" # command to execute
# 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
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXEC_CMD_ARGS="-wn /data" # command arguments
PRE_EXEC_MESSAGE="" # Show message before execute
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -153,4 +165,4 @@ else
fi
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exit $SERVICE_EXIT_CODE
__script_exit $SERVICE_EXIT_CODE