summarylogtreecommitdiffstats
path: root/macfanctld.install
blob: 473e4ab0a5d3864afc6f409469e93892eb4c5a58 (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
pre_upgrade() {
  local _active=/tmp/.macfanctld
  systemctl daemon-reload
  if [ $(systemctl is-active macfanctld.service) ]; then
    systemctl --quiet stop macfanctld.service
    touch $_active
  elif [ -f $_active ]; then
    rm --force $_active
  fi
}

post_upgrade() {
  local _active=/tmp/.macfanctld
  systemctl daemon-reload
  if [ -f $_active ]; then
    systemctl --quiet start macfanctld.service
    rm --force $_active
  fi
}

pre_remove() {
  if [ $(systemctl is-active macfanctld.service) ]; then
    systemctl --quiet stop macfanctld.service
  fi
}