diff options
author | Twann | 2023-07-20 14:30:33 +0200 |
---|---|---|
committer | Twann | 2023-07-20 14:30:33 +0200 |
commit | c924c786d8dc11d9274f9c2985fd1d32c8e92b02 (patch) | |
tree | e429058117450f7dfc8b4f5aa32cf03b737aa6c3 | |
parent | 7c10f7f4a8eda764c94d3daa3cc31506adc5182c (diff) | |
download | aur-c924c786d8dc11d9274f9c2985fd1d32c8e92b02.tar.gz |
add 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 +} + |