#!/bin/bash
set -e
# 卸载时清理所有普通用户的自启动项（主程序文件由 dpkg 自动删除）
for _u in $(awk -F: '$3>=1000 && $3<65534 {print $1}' /etc/passwd); do
    _h=$(getent passwd "$_u" | cut -d: -f6)
    [ -d "$_h" ] || continue
    rm -f "$_h/.config/autostart/savejump.desktop" 2>/dev/null || true
done
exit 0
