summarylogtreecommitdiffstats
path: root/roccat-tools.install
blob: a840dcad1e291b370acb2d3a2bb5932761efb908 (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
30
31
32
33
post_install() {
  ldconfig
  touch --no-create /usr/share/icons/hicolor

  groupadd --force roccat

  mkdir --parents /var/lib/roccat
  chown root:roccat /var/lib/roccat
  chmod 2770 /var/lib/roccat

  udevadm control --reload-rules

echo
echo "Add yourself to the roccat group: gpasswd -a [your user] roccat"
echo
}

post_upgrade() {
  ldconfig
  touch --no-create /usr/share/icons/hicolor
  udevadm control --reload-rules
}

post_remove() {
  ldconfig
  udevadm control --reload-rules

  # If there are some configuration files in this dir, we get an error, which
  # is good because we don't want to remove the user configs.
  rm -r /var/lib/roccat

  groupdel roccat
}