summaryrefslogtreecommitdiffstats
path: root/extra/tomcat/tomcat.install
diff options
context:
space:
mode:
authorpierre <pierre@nutyx.(none)>2010-01-09 11:31:07 +0100
committerpierre <pierre@nutyx.(none)>2010-01-09 11:31:07 +0100
commitaa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8 (patch)
tree6a2d12a0c54bfe578b3e044ac76e604108d5f501 /extra/tomcat/tomcat.install
parent1f3e8eb96741a4c7c44f3a9825ab1fbf33f72f7f (diff)
downloadnutyx-extra-aa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8.tar.gz
nutyx-extra-aa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8.tar.bz2
nutyx-extra-aa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8.tar.xz
nutyx-extra-aa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8.zip
Ajout de tomcat#5.5.28-1
Diffstat (limited to 'extra/tomcat/tomcat.install')
-rwxr-xr-xextra/tomcat/tomcat.install37
1 files changed, 37 insertions, 0 deletions
diff --git a/extra/tomcat/tomcat.install b/extra/tomcat/tomcat.install
new file mode 100755
index 000000000..3ed956226
--- /dev/null
+++ b/extra/tomcat/tomcat.install
@@ -0,0 +1,37 @@
+post_install() {
+ if [ ! `grep tomcat /etc/group` ]; then
+ groupadd -g 66 tomcat &>/dev/null;
+ fi
+
+ id tomcat &>/dev/null || \
+ 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
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ userdel tomcat &> /dev/null
+ groupdel tomcat &> /dev/null
+}
+
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+
+$op $*
+# vim: ts=2 sw=2 et ft=sh