Delete users in prerm

This commit is contained in:
Valeriy Manzhos 2026-04-10 16:36:55 +03:00
parent d2458443b8
commit 29f620711a
No known key found for this signature in database
GPG key ID: 6547CFC8E2EC3D90

View file

@ -604,6 +604,16 @@ chmod 570 /opt/v2rayN/binConfigs
chown -R v2rayn-core:v2rayn /opt/v2rayN/guiLogs
chmod 750 /opt/v2rayN/guiLogs
exit 0
EOF
# prerm
install -m 755 /dev/stdin "$DEBIAN_DIR/prerm" <<'EOF'
#!/bin/sh
set -ex
pgrep --uid 785 && pkill --uid 785 || true
id -u 785 && userdel v2rayn-core || true
getent group v2rayn && groupdel v2rayn || true
exit 0
EOF
# postrm
@ -614,9 +624,6 @@ update-desktop-database /usr/share/applications >/dev/null 2>&1 || true
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f /usr/share/icons/hicolor >/dev/null 2>&1 || true
fi
pgrep --uid 785 && pkill --uid 785 || true
id -u 785 && userdel v2rayn-core || true
getent group v2rayn && groupdel v2rayn || true
exit 0
EOF