20 lines
700 B
Bash
Executable File
20 lines
700 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 "未删除 /userdata/data/.recording-paused-low-disk;如需恢复录像,请确认空间充足后人工删除。"
|