summarylogtreecommitdiffstats
path: root/asus-nb-wmi-reload.install
diff options
context:
space:
mode:
Diffstat (limited to 'asus-nb-wmi-reload.install')
-rw-r--r--asus-nb-wmi-reload.install38
1 files changed, 19 insertions, 19 deletions
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
}