summaryrefslogtreecommitdiff
path: root/pcr/diaspora-git/diaspora.install
blob: 7833be058dbceb4ced4a69290b4820b6d4f6d6f3 (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
dusr=diaspora
dhome=/usr/share/webapps/diaspora
dlog=/var/log/diaspora.log

post_install() {
  getent passwd $dusr &>/dev/null || useradd -r -d $dhome -s /bin/bash $dusr &>/dev/null
  chown -R $dusr:$dusr $dhome &>/dev/null
  [[ -f $dlog ]] && chown $dusr:$dusr $dlog
}

pre_upgrade(){
  etc/rc.d/diaspora stop &>/dev/null
  return 0
}

post_upgrade(){
  post_install $1
}

pre_remove(){
  pre_upgrade $1
}

post_remove(){
  getent passwd $dusr &>/dev/null && userdel -f $dusr
  return 0
}