mirror of
https://github.com/andrey271192/WARP-Web-UI-Relay-Beta.git
synced 2026-09-20 11:55:35 +00:00
docs: русская документация и промпты установки
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
22
uninstall.sh
22
uninstall.sh
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# WARP Web UI — one-command uninstaller
|
||||
# WARP Web UI — удаление одной командой
|
||||
set -euo pipefail
|
||||
|
||||
INSTALL_DIR="${WARP_WEBUI_INSTALL_DIR:-/opt/warp-webui}"
|
||||
@@ -9,11 +9,11 @@ UNIT="/etc/systemd/system/${SERVICE_NAME}.service"
|
||||
BRIDGE_UNIT="/etc/systemd/system/warp-socks-bridge.service"
|
||||
|
||||
if [[ "${EUID:-0}" -ne 0 ]]; then
|
||||
echo "Run as root: sudo bash uninstall.sh"
|
||||
echo "Запустите от root: sudo bash uninstall.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=== WARP Web UI uninstaller ==="
|
||||
echo "=== Удаление WARP Web UI ==="
|
||||
|
||||
if systemctl is-active --quiet "${SERVICE_NAME}.service" 2>/dev/null; then
|
||||
systemctl stop "${SERVICE_NAME}.service"
|
||||
@@ -32,19 +32,19 @@ systemctl disable warp-socks-bridge.service 2>/dev/null || true
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
read -rp "Remove application files in ${INSTALL_DIR}? [y/N]: " REMOVE_APP
|
||||
if [[ "${REMOVE_APP,,}" == "y" || "${REMOVE_APP,,}" == "yes" ]]; then
|
||||
read -rp "Удалить файлы приложения в ${INSTALL_DIR}? [y/N]: " REMOVE_APP
|
||||
if [[ "${REMOVE_APP,,}" == "y" || "${REMOVE_APP,,}" == "yes" || "${REMOVE_APP,,}" == "д" || "${REMOVE_APP,,}" == "да" ]]; then
|
||||
rm -rf "${INSTALL_DIR}"
|
||||
fi
|
||||
|
||||
read -rp "Remove config ${ENV_FILE} and /etc/warp-webui/? [y/N]: " REMOVE_CFG
|
||||
if [[ "${REMOVE_CFG,,}" == "y" || "${REMOVE_CFG,,}" == "yes" ]]; then
|
||||
read -rp "Удалить конфиг ${ENV_FILE} и каталог /etc/warp-webui/? [y/N]: " REMOVE_CFG
|
||||
if [[ "${REMOVE_CFG,,}" == "y" || "${REMOVE_CFG,,}" == "yes" || "${REMOVE_CFG,,}" == "д" || "${REMOVE_CFG,,}" == "да" ]]; then
|
||||
rm -f "${ENV_FILE}"
|
||||
rm -rf /etc/warp-webui
|
||||
fi
|
||||
|
||||
read -rp "Remove cloudflare-warp package (apt remove)? [y/N]: " REMOVE_WARP
|
||||
if [[ "${REMOVE_WARP,,}" == "y" || "${REMOVE_WARP,,}" == "yes" ]]; then
|
||||
read -rp "Удалить пакет cloudflare-warp (apt remove)? [y/N]: " REMOVE_WARP
|
||||
if [[ "${REMOVE_WARP,,}" == "y" || "${REMOVE_WARP,,}" == "yes" || "${REMOVE_WARP,,}" == "д" || "${REMOVE_WARP,,}" == "да" ]]; then
|
||||
if [[ -x "${INSTALL_DIR}/scripts/warp-uninstall-cf.sh" ]]; then
|
||||
WARP_PROXY_PORT=1024 bash "${INSTALL_DIR}/scripts/warp-uninstall-cf.sh"
|
||||
elif command -v warp-cli >/dev/null 2>&1; then
|
||||
@@ -52,8 +52,8 @@ if [[ "${REMOVE_WARP,,}" == "y" || "${REMOVE_WARP,,}" == "yes" ]]; then
|
||||
systemctl stop warp-svc 2>/dev/null || true
|
||||
apt-get remove -y -qq cloudflare-warp 2>/dev/null || apt-get purge -y -qq cloudflare-warp 2>/dev/null || true
|
||||
else
|
||||
echo "cloudflare-warp not found; skipped."
|
||||
echo "Пакет cloudflare-warp не найден; пропуск."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "WARP Web UI uninstalled."
|
||||
echo "WARP Web UI удалён."
|
||||
|
||||
Reference in New Issue
Block a user