summarylogtreecommitdiffstats
path: root/rstudio-server-git.install
blob: ce23cf967caa15d011f1ef2e3e65014cfcc02c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
  getent group "rstudio" &>/dev/null || groupadd -r rstudio 1>/dev/null
  getent passwd "rstudio" &>/dev/null || useradd -r -g rstudio -d "/srv/rstudio" -s "/bin/sh" rstudio 1>/dev/null
  chown -R rstudio:rstudio /srv/rstudio
  
  
}

post_remove() {
  if getent passwd "rstudio" >/dev/null; then
    userdel rstudio >/dev/null
  fi
  if getent group "rstudio" >/dev/null; then
    groupdel rstudio >/dev/null
  fi
  rm -f /usr/sbin/rstudio-server
}