This commit is contained in:
Den Piligrim
2026-05-21 22:58:29 +03:00
parent 962544820f
commit 26f3bb2934
48 changed files with 2877 additions and 1170 deletions
+35
View File
@@ -250,6 +250,40 @@ ensure_bus_location() {
mv "$tmp_file" "$nginx_conf"
}
remove_hysteria_mount() {
local compose_file="$1"
[[ -f "$compose_file" ]] || return 0
local tmp_file
tmp_file="$(mktemp)"
awk '
/^[[:space:]]*volumes:[[:space:]]*$/ {
pending_volumes = $0
next
}
/\/etc\/hysteria\/config\.yaml:\/etc\/hysteria\/config\.yaml:ro/ {
pending_volumes = ""
next
}
{
if (pending_volumes != "") {
print pending_volumes
pending_volumes = ""
}
print $0
}
END {
if (pending_volumes != "") print pending_volumes
}
' "$compose_file" > "$tmp_file"
mv "$tmp_file" "$compose_file"
}
need_root() {
[[ $EUID -eq 0 ]] || die "Запускать только от root"
}
@@ -287,6 +321,7 @@ check_and_fix_credentials || true
#################################
ensure_nginx_api_timeouts "$PROJECT_DIR/client/nginx-client.conf"
ensure_bus_location "$PROJECT_DIR/client/nginx-client.conf"
remove_hysteria_mount "$PROJECT_DIR/docker-compose.yml"
#################################
# REBUILD BACKEND