diff options
Diffstat (limited to 'tblock.install')
-rw-r--r-- | tblock.install | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tblock.install b/tblock.install new file mode 100644 index 000000000000..dc8f56dd5e21 --- /dev/null +++ b/tblock.install @@ -0,0 +1,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 +} + |