release: sync public installer asset remount-fuse.sh
This commit is contained in:
+4
-3
@@ -126,7 +126,8 @@ env_snapshot=$(mktemp "$private_tmp/env.snapshot.XXXXXX") || { rm -rf "$private_
|
|||||||
config_snapshot=$(mktemp "$private_tmp/config.snapshot.XXXXXX") || { rm -rf "$private_tmp"; rmdir "$lock_dir" 2>/dev/null || true; die 'cannot create private config snapshot'; }
|
config_snapshot=$(mktemp "$private_tmp/config.snapshot.XXXXXX") || { rm -rf "$private_tmp"; rmdir "$lock_dir" 2>/dev/null || true; die 'cannot create private config snapshot'; }
|
||||||
cp "$install_dir/.env" "$env_snapshot"; cp "$install_dir/config.yaml" "$config_snapshot"
|
cp "$install_dir/.env" "$env_snapshot"; cp "$install_dir/config.yaml" "$config_snapshot"
|
||||||
LOG_FILE=$log_file
|
LOG_FILE=$log_file
|
||||||
cleanup() { status=$?; rm -rf "$private_tmp"; rmdir "$lock_dir" 2>/dev/null || true; exit "$status"; }
|
env_tmp= config_tmp=
|
||||||
|
cleanup() { status=$?; rm -f "$env_tmp" "$config_tmp"; rm -rf "$private_tmp"; rmdir "$lock_dir" 2>/dev/null || true; exit "$status"; }
|
||||||
trap cleanup EXIT INT TERM
|
trap cleanup EXIT INT TERM
|
||||||
|
|
||||||
compose() { docker compose --project-directory "$install_dir" --env-file "$install_dir/.env" -f "$install_dir/compose.yaml" "$@"; }
|
compose() { docker compose --project-directory "$install_dir" --env-file "$install_dir/.env" -f "$install_dir/compose.yaml" "$@"; }
|
||||||
@@ -150,8 +151,8 @@ if [ -n "$old_mount_id" ]; then
|
|||||||
inspect_mount "${old_path:-$new_path}" || fail_restore 'mount identity is unstable after unmount'
|
inspect_mount "${old_path:-$new_path}" || fail_restore 'mount identity is unstable after unmount'
|
||||||
[ -z "$mount_id" ] || fail_restore 'FUSE path is still mounted'
|
[ -z "$mount_id" ] || fail_restore 'FUSE path is still mounted'
|
||||||
fi
|
fi
|
||||||
env_tmp=$(mktemp "$private_tmp/env.write.XXXXXX") || fail_restore 'cannot create private environment write file'
|
env_tmp=$(mktemp "$install_dir/.env.write.XXXXXX") || fail_restore 'cannot create environment write file'
|
||||||
config_tmp=$(mktemp "$private_tmp/config.write.XXXXXX") || fail_restore 'cannot create private config write file'
|
config_tmp=$(mktemp "$install_dir/.config.write.XXXXXX") || fail_restore 'cannot create config write file'
|
||||||
chmod 600 "$env_tmp" "$config_tmp"
|
chmod 600 "$env_tmp" "$config_tmp"
|
||||||
if ! FUSE_ENABLED=$enabled FUSE_PATH=${new_path:-${old_path:-}} python3 - "$install_dir/.env" "$install_dir/config.yaml" "$env_tmp" "$config_tmp" <<'PY'
|
if ! FUSE_ENABLED=$enabled FUSE_PATH=${new_path:-${old_path:-}} python3 - "$install_dir/.env" "$install_dir/config.yaml" "$env_tmp" "$config_tmp" <<'PY'
|
||||||
import os, pathlib
|
import os, pathlib
|
||||||
|
|||||||
Reference in New Issue
Block a user