mirror of
https://github.com/casjaysdevdocker/opengist
synced 2026-08-14 14:01:17 -04:00
- .env.scripts: synced version stamp to current template; preserved ENV_PULL_URL=casjaysdev/alpine (gen-dockerfile's --update path had a bug computing "alpine" instead, corrected manually per the casjaysdevdocker->casjaysdev/* base-image convention) - rootfs/usr/local/bin/entrypoint.sh: regenerated from current template; fixes stale CONTAINER_NAME="alpine" -> "opengist" and normalizes whitespace - rootfs/usr/local/etc/docker/functions/entrypoint.sh: replaced from template; picks up upstream fix for __symlink/__initialize_ssl_certs returning nonzero on success under set -e - rootfs/root/docker/setup/00-init.sh, 01-system.sh, 02-packages.sh, 03-files.sh, 04-users.sh, 06-post.sh, 07-cleanup.sh: version stamp bump only, no logic change - rootfs/root/docker/setup/05-custom.sh: version stamp bump only; restored the opengist binary download/install logic that the template regeneration would have wiped (this file is app-specific, not boilerplate)
48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck shell=bash
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
##@Version : 202608031101-git
|
|
# @@Author : CasjaysDev
|
|
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
|
# @@License : WTFPL
|
|
# @@Copyright : Copyright 2026 CasjaysDev
|
|
# @@Created : Mon Aug 3 11:01:46 AM 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
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|