mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-16 01:26:12 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d47d4f7bd7 | |||
| 17394ea2ef |
@@ -16,14 +16,14 @@ update_os
|
||||
msg_warn "WARNING: This script will run an external installer from a third-party source (https://swizzin.ltd/)."
|
||||
msg_warn "The following code is NOT maintained or audited by our repository."
|
||||
msg_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ https://s5n.sh"
|
||||
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ https://raw.githubusercontent.com/swizzin/swizzin/master/setup.sh"
|
||||
echo
|
||||
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
msg_error "Aborted by user. No changes have been made."
|
||||
exit 10
|
||||
fi
|
||||
bash <(curl -fsSL https://s5n.sh)
|
||||
bash <(curl -fsSL https://raw.githubusercontent.com/swizzin/swizzin/master/setup.sh)
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
+9
-13
@@ -1336,10 +1336,6 @@ create_backup() {
|
||||
msg_warn "Skipping backup of '${path}' (not found)"
|
||||
continue
|
||||
fi
|
||||
if mountpoint -q "$path" 2>/dev/null; then
|
||||
msg_warn "Skipping backup of '${path}' (is a mount point)"
|
||||
continue
|
||||
fi
|
||||
dest="${store}/files${path}"
|
||||
if ! mkdir -p "$(dirname "$dest")" || ! cp -a "$path" "$dest"; then
|
||||
msg_error "Backup of '${path}' failed - aborting update"
|
||||
@@ -2528,9 +2524,9 @@ _download_source_tarball() {
|
||||
# directory). Extracts <tarball_path> into <workdir>, then copies the contents
|
||||
# of that top-level directory into <target>.
|
||||
#
|
||||
# - Honors CLEAN_INSTALL=1 (wipes <target> first, dotfiles included, mount
|
||||
# points preserved — back up config dotfiles like .env via create_backup
|
||||
# and call restore_backup BEFORE any build step that sources them).
|
||||
# - Honors CLEAN_INSTALL=1 (wipes <target> first, dotfiles included — back
|
||||
# up config dotfiles like .env via create_backup and call restore_backup
|
||||
# BEFORE any build step that sources them).
|
||||
# - Does NOT own <workdir>: the caller creates it and is responsible for its
|
||||
# cleanup (typically via a RETURN trap on its tmpdir).
|
||||
# - cp failures are non-fatal here, matching the previous inline behavior.
|
||||
@@ -2542,7 +2538,7 @@ _deploy_source_tarball() {
|
||||
|
||||
mkdir -p "$target"
|
||||
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
|
||||
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
|
||||
find "${target:?}" -mindepth 1 -delete
|
||||
fi
|
||||
|
||||
tar --no-same-owner -xzf "$tarball" -C "$workdir" || {
|
||||
@@ -2568,9 +2564,9 @@ _deploy_source_tarball() {
|
||||
# a single top-level directory, that directory is stripped (its contents land
|
||||
# directly in <target>); otherwise the archive contents are copied as-is.
|
||||
#
|
||||
# - Honors CLEAN_INSTALL=1 (wipes <target> first, dotfiles included, mount
|
||||
# points preserved — back up config dotfiles like .env via create_backup
|
||||
# and call restore_backup BEFORE any build step that sources them).
|
||||
# - Honors CLEAN_INSTALL=1 (wipes <target> first, dotfiles included — back
|
||||
# up config dotfiles like .env via create_backup and call restore_backup
|
||||
# BEFORE any build step that sources them).
|
||||
# - Does NOT own <workdir>: the caller creates it and cleans it up.
|
||||
#
|
||||
# Returns: 0 on success, 65 on unsupported format, 251 on extraction failure,
|
||||
@@ -2631,7 +2627,7 @@ _deploy_unpacked_archive() {
|
||||
# was truncated, the archive was unreadable, or it unpacked to nothing.
|
||||
mkdir -p "$target"
|
||||
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
|
||||
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
|
||||
find "${target:?}" -mindepth 1 -delete
|
||||
fi
|
||||
|
||||
if ! cp -r "$source_dir"/* "$target/"; then
|
||||
@@ -9372,7 +9368,7 @@ fetch_and_deploy_from_url() {
|
||||
mkdir -p "$directory"
|
||||
|
||||
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
|
||||
find "${directory:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
|
||||
find "${directory:?}" -mindepth 1 -delete
|
||||
fi
|
||||
|
||||
local unpack_tmp
|
||||
|
||||
Reference in New Issue
Block a user