20 lines
695 B
Bash
Executable File
20 lines
695 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ "${EUID}" -ne 0 ]]; then
|
|
echo "请使用 sudo 执行: sudo ./scripts/uninstall.sh" >&2
|
|
exit 1
|
|
fi
|
|
|
|
systemctl disable --now cleanup-smartcam-data.timer 2>/dev/null || true
|
|
systemctl disable --now cleanup-smartcam-data-resume.timer 2>/dev/null || true
|
|
rm -f \
|
|
/etc/systemd/system/cleanup-smartcam-data.timer \
|
|
/etc/systemd/system/cleanup-smartcam-data-resume.timer \
|
|
/etc/systemd/system/cleanup-smartcam-data.service \
|
|
/usr/local/sbin/cleanup-smartcam-data
|
|
systemctl daemon-reload
|
|
|
|
echo "cleanup-smartcam-data 已卸载。"
|
|
echo "未删除 /var/lib/cleanup-smartcam-data;请确认采集未处于暂停状态后再人工处理该目录。"
|