mirror of
https://github.com/dockersrc/rust
synced 2026-08-09 02:01:13 -04:00
Ran the AI.md template-update runbook: synced .env.scripts and Dockerfile ARGs to the current template, regenerated entrypoint.sh and setup/*.sh from the template, then cleaned up now-dead DEFAULT_FILE_DIR/DATA_DIR/CONF_DIR/TEMPLATE_DIR references left in the Dockerfile after the template-files concept was retired. - .env.scripts: dropped DEFAULT_FILE_DIR/DATA_DIR/CONF_DIR/TEMPLATE_DIR, ssmtp -> msmtp, license MIT -> WTFPL, ENV_PULL_URL value updated - Dockerfile: removed now-unused DEFAULT_FILE_DIR/DATA_DIR/CONF_DIR/ TEMPLATE_DIR ARG declarations (3 stages) and the mkdir referencing them; PACK_LIST ssmtp -> msmtp - rootfs/usr/local/bin/entrypoint.sh: regenerated from template — CONTAINER_NAME set to "rust", safer grep -- usage, exec/shell argument handling fixed to not swallow args when none given - rootfs/usr/local/etc/docker/functions/entrypoint.sh: regenerated from template - rootfs/root/docker/setup/00-init.sh: regenerated; dropped dead template-files cleanup block - rootfs/root/docker/setup/01-system.sh: regenerated (boilerplate only) - rootfs/root/docker/setup/02-packages.sh: regenerated (boilerplate only) - rootfs/root/docker/setup/03-files.sh: regenerated — dropped template-files mirroring, added /tmp/usr handling - rootfs/root/docker/setup/04-users.sh: regenerated (boilerplate only) - rootfs/root/docker/setup/06-post.sh: regenerated (boilerplate only) - rootfs/root/docker/setup/07-cleanup.sh: regenerated (boilerplate only) Note: rootfs/root/docker/setup/05-custom.sh was NOT regenerated — it holds hand-written Rust toolchain install logic, not template boilerplate; the runbook's blind regenerate would have destroyed it.
48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
##@Version : 202607271318-git
|
|
# @@Author : CasjaysDev
|
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
|
# @@License : WTFPL
|
|
# @@Copyright : Copyright 2026 CasjaysDev
|
|
# @@Created : Mon Jul 27 01:18:36 PM EDT 2026
|
|
# @@File : 07-cleanup.sh
|
|
# @@Description : script to run cleanup
|
|
# @@Changelog : newScript
|
|
# @@TODO : Refactor code
|
|
# @@Other : N/A
|
|
# @@Resource : N/A
|
|
# @@Terminal App : yes
|
|
# @@sudo/root : yes
|
|
# @@Template : templates/dockerfiles/init_scripts/07-cleanup.sh
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Set bash options
|
|
set -eo pipefail
|
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Load functions
|
|
__find_and_remove() { [ -z "$1" ] || find "${2:-/etc}" -iname "$1" -exec rm -Rf {} + 2>/dev/null; }
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Set env variables
|
|
exitCode=0
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Predefined actions
|
|
if [ -d "/tmp" ]; then rm -Rf "/tmp"/*; fi
|
|
if [ -d "$HOME/.cache" ]; then rm -Rf "$HOME/.cache"; fi
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Main script
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# Set the exit code
|
|
exitCode=$?
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
exit $exitCode
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# ex: ts=2 sw=2 et filetype=sh
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|