summarylogtreecommitdiffstats
path: root/dmesg-shutdown-install.sh
blob: 9e4d1dd9ce6c57545a50b4e9184a46eb9bff394a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
_pkgname='dmesg-shutdown'

post_upgrade() {
  set -u
  systemctl daemon-reload
  if ! systemctl -q is-enabled "${_pkgname}.service"; then
    systemctl enable --now "${_pkgname}.service"
  fi
  set +u
}

post_install() {
  post_upgrade
}

pre_remove() {
  systemctl disable --now "${_pkgname}.service"
}

post_remove() {
  systemctl daemon-reload
}