zapretgui/packaging/linux/arch/zapretgui.install
loop-uh f6d21d306e
All checks were successful
Zapret source guards / validate (push) Successful in 9s
Linux: pacman and dnf support in install.sh, PKGBUILD for Arch, RPM spec for Fedora
install.sh and so the AppImage now use pacman on Arch and dnf on Fedora with the right
package names, like apt before. The PKGBUILD and the spec repackage the .deb; both were
built, installed and removed in an Arch and a Fedora 45 chroot.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 09:40:27 -05:00

17 lines
869 B
Text

post_install() {
echo '==> Zapret: start the helper (the small root service) and add yourself to its group:'
echo ' sudo systemctl enable --now zapretgui-helper.service'
echo ' sudo usermod -aG zapretgui "$USER"'
echo ' The window starts inside the group at once; a new login makes it permanent. Then open "Zapret" from the menu.'
}
post_upgrade() {
# the files of the helper changed: the running one is replaced by the new one
if [ -d /run/systemd/system ]; then systemctl try-restart zapretgui-helper.service || true; fi
}
pre_remove() {
if [ -d /run/systemd/system ]; then systemctl disable --now zapretgui-helper.service || true; fi
# the helper removes its firewall table when it stops; this is the second net, so no rule outlives the program
command -v nft >/dev/null 2>&1 && nft delete table inet zapretgui 2>/dev/null || true
}