blob: 359e0a54bd25379e96f4c2ec5890fa425b54fc58 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
set -e
# A hub left running once its package is gone serves from deleted code, and
# keeps writing bytecode into the shared venv.
case "$1" in
remove|deconfigure)
if [ -d /run/systemd/system ]; then
systemctl stop meshbay-hub.service 2>/dev/null || true
fi
;;
esac
# The hub's code lives in meshbay-common's venv, and meshbay-common's own
# cleanup runs only after this package is gone: the bytecode compiled next to
# it is removed here, or dpkg cannot remove the directories it sits in.
case "$1" in
remove|upgrade|deconfigure)
find /opt/meshbay-common/venv/lib/python3.*/site-packages/meshbay_hub \
-depth -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
;;
esac
#DEBHELPER#
|