summarylogtreecommitdiffstats
path: root/mutantfactions.install
blob: e540e06f30b6cf439e1782dfadf12228a4b95afc (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
post_install() {
  xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
  if [ ! `grep mutantfactions /etc/group` ]; then
    groupadd mutantfactions &> /dev/null;
  fi

  id mutantfactions &>/dev/null || \
    useradd -g mutantfactions -d /var/lib/mutantfactions -s /bin/false mutantfactions

  chgrp -R mutantfactions /opt/mutantfactions/data
  chown mutantfactions:mutantfactions /var/lib/mutantfactions
  echo "  >> Add yourself to the mutantfactions group to run the game."
}

post_upgrade() {
  post_install
}

pre_remove() {
  userdel mutantfactions &> /dev/null
  groupdel mutantfactions &> /dev/null
}

post_remove () {
  xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
}