summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTwann2023-07-20 14:30:33 +0200
committerTwann2023-07-20 14:30:33 +0200
commitc924c786d8dc11d9274f9c2985fd1d32c8e92b02 (patch)
treee429058117450f7dfc8b4f5aa32cf03b737aa6c3
parent7c10f7f4a8eda764c94d3daa3cc31506adc5182c (diff)
downloadaur-c924c786d8dc11d9274f9c2985fd1d32c8e92b02.tar.gz
add tblock.install
-rw-r--r--tblock.install33
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
+}
+