All checks were successful
Zapret source guards / validate (push) Successful in 9s
First Nuitka build of the program on Linux showed that the compiled program does not turn the "C" locale into UTF-8: Russian preset file names became lone surrogates and the first-run seeding of the data folder failed. New `Launch.prepare_process()` (no-op on Windows and in the stub) restarts the Linux program once in UTF-8 mode; the start wrappers also set PYTHONUTF8=1.
`src/main.py --zapret-helper` runs the same compiled file in the helper role (what zapretgui-helper.service starts). New: packaging/linux/bin/{zapretgui,zapretgui-helper}, packaging/linux/deb/{control.in,postinst,prerm,postrm}, tests for the wrappers, the dispatch and the .deb files.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
460 B
Shell
11 lines
460 B
Shell
#!/bin/sh
|
|
set -e
|
|
if [ "$1" = remove ] || [ "$1" = upgrade ] || [ "$1" = deconfigure ]; then
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl stop zapretgui-helper.service || true
|
|
[ "$1" = remove ] && systemctl disable zapretgui-helper.service || true
|
|
fi
|
|
# the helper removes its table when it stops; this is the second net, so no rule outlives the program
|
|
command -v nft >/dev/null && nft delete table inet zapretgui 2>/dev/null || true
|
|
fi
|
|
exit 0
|