Skip to content

Commit

Permalink
优化卸载
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuchen Deng committed Nov 27, 2021
1 parent bad4d7f commit c8dc340
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions base-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ fi
systemctl disable systemd-nspawn@$1.service
systemctl stop systemd-nspawn@$1.service

rm -f /var/lib/polkit-1/localauthority/10-vendor.d/machines.pkla
rm -f /usr/share/polkit-1/rules.d/10-machines.rules

[ -f /lib/systemd/system/nspawn-$1.service ] && systemctl disable nspawn-$1.service
rm -f /lib/systemd/system/nspawn-$1.service

Expand Down Expand Up @@ -54,4 +51,9 @@ if [[ ! $EXEC_FROM_CONFIG ]] && [ -f /usr/share/applications/deepin-weixin.deskt
rm -f /usr/share/applications/deepin-weixin.desktop
fi

if [ ! -f /usr/local/bin/*-config ]; then
rm -f /var/lib/polkit-1/localauthority/10-vendor.d/machines.pkla
rm -f /usr/share/polkit-1/rules.d/10-machines.rules
fi

[[ ! $EXEC_FROM_CONFIG ]] && echo "为防止数据意外丢失,您需要手动删除 ~/.machines/$1 文件夹!"

0 comments on commit c8dc340

Please sign in to comment.