summarylogtreecommitdiffstats
path: root/downpour.install
blob: b2c9c306e28c8ed6455510d45321e4a6798c4de0 (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
_add_user() {
  useradd -c "downpour torrent" -d '/' -s /bin/false downpour
  passwd -l downpour
}

post_install(){
  _add_user
  echo "
>>> Start webinterface : localhost:6280
>>> Log in Username : admin
>>> Password : password
"
}

post_upgrade(){
  getent passwd downpour >/dev/null 2>&1 || _add_user
}

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