summarylogtreecommitdiffstats
path: root/bamf-ubuntu.install
diff options
context:
space:
mode:
Diffstat (limited to 'bamf-ubuntu.install')
-rw-r--r--bamf-ubuntu.install31
1 files changed, 31 insertions, 0 deletions
diff --git a/bamf-ubuntu.install b/bamf-ubuntu.install
new file mode 100644
index 000000000000..1dc976a9526e
--- /dev/null
+++ b/bamf-ubuntu.install
@@ -0,0 +1,31 @@
+generate_index() {
+ if [[ ! -f usr/share/applications/bamf.index ]]; then
+ echo 'Generating initial BAMF index'
+ usr/lib/bamf/update-bamf-index.sh
+ fi
+}
+
+disable_service() {
+ systemctl stop bamfwatcher &>/dev/null || :
+ systemctl disable bamfwatcher &>/dev/null || :
+}
+
+post_install() {
+ generate_index
+}
+
+post_upgrade() {
+ generate_index
+}
+
+pre_upgrade() {
+ disable_service
+}
+
+pre_remove() {
+ disable_service
+}
+
+post_remove() {
+ rm -f usr/share/applications/bamf.index
+}