summarylogtreecommitdiffstats
path: root/teamspeak3-server.install
blob: cbaf1fbe3fff4f230cd6b01136940cda3fd698e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
  /usr/bin/getent group teamspeak &> /dev/null || /usr/bin/groupadd -r teamspeak &> /dev/null
  /usr/bin/getent passwd teamspeak &> /dev/null || /usr/bin/useradd -r -c "TeamSpeak Server" -M -d /var/lib/teamspeak3-server -g teamspeak -s /usr/bin/nologin teamspeak &> /dev/null

  /usr/bin/chown -R teamspeak:teamspeak \
    /var/lib/teamspeak3-server \
    /var/log/teamspeak3-server

  echo " >>> TeamSpeak End User License Agreement:"
  echo " >>> You need to agree with the license at"
  echo " >>> /usr/share/licenses/teamspeak3-server/LICENSE"
  echo " >>> before you are allowed to use teamspeak3-server."
}

post_remove() {
  /usr/bin/getent passwd teamspeak &> /dev/null && /usr/bin/userdel teamspeak &> /dev/null
}