summarylogtreecommitdiffstats
path: root/asus-fan-dkms-git.install
blob: 776f7afb793340b478288e9ffdacf9c68b007c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
PKGVER="$(ls /usr/src/ | grep 'asus_fan' | cut -d '-' -f 2)"
_dkms="/usr/bin/dkms"


post_install() {
  ${_dkms} add -m "asus_fan/${PKGVER}"
  ${_dkms} build -m "asus_fan/${PKGVER}"
  ${_dkms} install -m "asus_fan/${PKGVER}"

  echo "Enabling asus-fan as service in systemd"
  systemctl enable asus-fan.service
}

post_upgrade() {
  post_install
}

pre_remove() {
  ${_dkms} remove -m "asus_fan/${PKGVER}" --all
}

pre_upgrade() {
  pre_remove
}

post_remove() {
  depmod -a
}