summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--asus-nb-wmi-reload.install38
2 files changed, 20 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4702422c390..5d6169e3d40 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Tue Feb 2 08:16:45 UTC 2016
+# Wed Feb 17 18:34:29 UTC 2016
pkgbase = asus-nb-wmi-reload-git
pkgdesc = A systemd service for reload ASUS NB WMI Driver after resume
pkgver = 20160126
diff --git a/asus-nb-wmi-reload.install b/asus-nb-wmi-reload.install
index 0aa894c0def..c8d86b52a57 100644
--- a/asus-nb-wmi-reload.install
+++ b/asus-nb-wmi-reload.install
@@ -1,27 +1,27 @@
+asus-nb-wmi-reload_enable() {
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ echo 'Service asus-nb-wmi-reload is enabled already.'
+ else
+ echo 'Enabling asus-nb-wmi-reload service...'
+ systemctl enable asus-nb-wmi-reload.service &> /dev/null
+ fi
+}
+
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
+ asus-nb-wmi-reload_enable
}
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
+ asus-nb-wmi-reload_enable
+ echo 'Reloading systemd...'
+ 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
+ systemctl is-enabled asus-nb-wmi-reload.service &> /dev/null
+ if [ $? -eq 0 ]; then
+ systemctl disable asus-nb-wmi-reload.service &> /dev/null
+ echo 'Disabling asus-nb-wmi-reload service...'
+ fi
}