diff --git a/README.md b/README.md index 495e3c3..cc6f1a2 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,13 @@ journalctl -u keenetic-ssh -f ```bash cd /opt/keenetic-ssh && git pull && systemctl restart keenetic-ssh ``` + +## Удаление с сервера (одной командой) + +Останавливается `keenetic-ssh`, удаляется unit и каталог **`/opt/keenetic-ssh`**: + +```bash +curl -fsSL https://raw.githubusercontent.com/andrey271192/Keenetic_SSH/main/uninstall.sh | sudo bash +``` + +Из каталога установки: `sudo bash uninstall.sh` diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..b8a719f --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e +echo "Удаление Keenetic SSH…" +systemctl stop keenetic-ssh 2>/dev/null || true +systemctl disable keenetic-ssh 2>/dev/null || true +rm -f /etc/systemd/system/keenetic-ssh.service +systemctl daemon-reload 2>/dev/null || true +rm -rf /opt/keenetic-ssh +echo "Готово."