add service

This commit is contained in:
2026-04-20 20:07:07 +07:00
parent 9b28cc924a
commit b53bb4c8a8
4 changed files with 136 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Script gỡ cài đặt LiteRT-LM systemd service
echo "========================================"
echo " Gỡ cài đặt LiteRT-LM Service"
echo "========================================"
echo
# Kiểm tra quyền sudo
if [ "$EUID" -ne 0 ]; then
echo "[ERROR] Vui lòng chạy script với sudo:"
echo " sudo bash uninstall_service.sh"
exit 1
fi
# Dừng service
echo "[1/3] Dừng service..."
systemctl stop litert-lm.service
# Disable service
echo "[2/3] Vô hiệu hóa service..."
systemctl disable litert-lm.service
# Xóa file service
echo "[3/3] Xóa file service..."
rm -f /etc/systemd/system/litert-lm.service
# Reload systemd
systemctl daemon-reload
systemctl reset-failed
echo
echo "========================================"
echo " Gỡ cài đặt thành công!"
echo "========================================"
echo