summarylogtreecommitdiffstats
path: root/tshock.install
blob: ac4440157bb9ceb78cf9db4df9b674acab5b58eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
  getent group tshock >/dev/null 2>&1 || groupadd tshock 
  getent passwd tshock >/dev/null 2>&1 || useradd -g tshock -d /srv/tshock/ -s /bin/bash tshock 
  chown -R tshock:tshock /srv/tshock/

  echo ">>> You can start the server in a default configuration by starting tshock@default.service"
}

post_upgrade() {
  post_install $1
}

post_remove() {
  if getent passwd tshock >/dev/null 2>&1; then
    userdel tshock 
  fi
  if getent group tshock >/dev/null 2>&1; then
    groupdel tshock 
  fi
}