summaryrefslogtreecommitdiff
path: root/extra/tomcat/tomcat.install
blob: 9f7c21d389b7b837f12fa7809d17f024077e9dd3 (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
29
30
31
32
33
34
35
36
post_install() {
  getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat
  getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d /opt/tomcat -s /bin/false tomcat

  if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
    echo ">>> It appears that your current kernel has linux security"
    echo ">>> capabilities built as a module. Tomcat requires this"
    echo ">>> functionality to operate."
    echo ">>>"
    echo ">>> To activate the module, please load it now (modprobe capability)."
    echo ">>> Also, you should add it to your MODULES array in rc.conf, so"
    echo ">>> it will be activated automatically at boot-up."
  fi

  echo ""
  echo "== End of life for Apache Tomcat 5.5.x =="
  echo "The Apache Tomcat team announces that support for Apache Tomcat 5.5.x"
  echo "will end on 30 September 2012."
  echo ""
  echo "You are thus strongly encouraged to migrate to tomcat6 or tomcat7"
  echo ""
  echo "See the Arch Linux wiki page for tomcat for more information."
}

post_upgrade() {
  post_install $1
}

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