Files
carpibord/systemd/uninstall.sh

28 lines
789 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Скрипт удаления systemd сервисов Carpibord
set -e
echo "=== Удаление Carpibord сервисов ==="
if [ "$EUID" -ne 0 ]; then
echo "Запусти с sudo: sudo ./uninstall.sh"
exit 1
fi
echo "[1/3] Остановка сервисов..."
systemctl stop carpibord.service 2>/dev/null || true
systemctl stop can0-link.service 2>/dev/null || true
echo "[2/3] Отключение автозапуска..."
systemctl disable carpibord.service 2>/dev/null || true
systemctl disable can0-link.service 2>/dev/null || true
echo "[3/3] Удаление файлов..."
rm -f /etc/systemd/system/carpibord.service
rm -f /etc/systemd/system/can0-link.service
systemctl daemon-reload
echo ""
echo "=== Сервисы удалены ==="