summarylogtreecommitdiffstats
path: root/otrs.install
blob: 1819bd0aecbc78a70a149b34af9fee239948fe85 (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
post_install() {
  getent passwd otrs > /dev/null || useradd -g http -d /usr/share/webapps/otrs otrs -M -N > /dev/null
  /usr/share/webapps/otrs/bin/./otrs.SetPermissions.pl \
    --otrs-user=otrs  \
    --web-group=http  \
      /usr/share/webapps/otrs > /dev/null
  chmod 2775 /usr/share/webapps/otrs
}

post_remove() {
   userdel -rf otrs
}

pre_upgrade() {
    chown 0:0 -R /etc/webapps/otrs
    chown 0:0 -R /usr/share/webapps/otrs
}

post_upgrade() {
  /usr/share/webapps/otrs/bin/./otrs.SetPermissions.pl \
    --otrs-user=otrs  \
    --web-group=http  \
      /usr/share/webapps/otrs > /dev/null
  chmod 2775 /usr/share/webapps/otrs
}