blob: dc8f56dd5e2180a2dd0fddb3bd509d62f058376c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
pre_install() {
if [ -f /usr/bin/systemctl ]
then
systemctl disable --now tblockd || true
fi
}
post_install() {
if [ -f /usr/bin/systemctl ]
then
systemctl enable --now tblockd || echo "Error: failed to enable daemon"
fi
}
pre_upgrade() {
pre_install
}
post_upgrade() {
if [ -f /usr/bin/systemctl ]
then
systemctl daemon-reload
fi
post_install
}
pre_remove() {
pre_install
# Optionally restore the stock hosts file
#tblock -Dqn
}
|