summarylogtreecommitdiffstats
path: root/asus-nb-wmi-reload.install
diff options
context:
space:
mode:
authorFadeMind2016-01-21 17:36:59 +0100
committerFadeMind2016-01-21 17:36:59 +0100
commit7abbd558ef365d7a32868dbfeedb175db1f1577e (patch)
treebf5559633ef3f9e3a425d2989ef2d82022b2ad66 /asus-nb-wmi-reload.install
downloadaur-7abbd558ef365d7a32868dbfeedb175db1f1577e.tar.gz
update
Diffstat (limited to 'asus-nb-wmi-reload.install')
-rw-r--r--asus-nb-wmi-reload.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/asus-nb-wmi-reload.install b/asus-nb-wmi-reload.install
new file mode 100644
index 00000000000..0aa894c0def
--- /dev/null
+++ b/asus-nb-wmi-reload.install
@@ -0,0 +1,27 @@
+post_install() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo 'Service is enabled already'
+ else
+ echo 'Enabling service'
+ systemctl enable asus-nb-wmi-reload.service &> /dev/null
+ fi
+}
+
+post_upgrade() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo 'Service is enabled already'
+ else
+ echo 'Enabling service'
+ systemctl enable asus-nb-wmi-reload.service &> /dev/null
+ fi
+ systemctl daemon-reload
+}
+
+pre_remove() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ systemctl disable asus-nb-wmi-reload.service &> /dev/null
+ fi
+}