diff options
author | sibelle <lesibel@free.fr> | 2010-02-28 08:27:51 +0100 |
---|---|---|
committer | sibelle <lesibel@free.fr> | 2010-02-28 08:27:51 +0100 |
commit | e57f8d990a2d9ae2c84bbe39d2a53537a2533517 (patch) | |
tree | 758f4c9d36561fbe6800738175dd818c5283fd98 /test/tomcat/tomcat.install | |
parent | a51266690da4df2e0ab59f0ce431f94b00abec90 (diff) | |
download | nutyx-pakxe-e57f8d990a2d9ae2c84bbe39d2a53537a2533517.tar.gz nutyx-pakxe-e57f8d990a2d9ae2c84bbe39d2a53537a2533517.tar.bz2 nutyx-pakxe-e57f8d990a2d9ae2c84bbe39d2a53537a2533517.tar.xz nutyx-pakxe-e57f8d990a2d9ae2c84bbe39d2a53537a2533517.zip |
Réparation de tomcat#5.5.28-1
Diffstat (limited to 'test/tomcat/tomcat.install')
-rwxr-xr-x | test/tomcat/tomcat.install | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/tomcat/tomcat.install b/test/tomcat/tomcat.install new file mode 100755 index 000000000..3ed956226 --- /dev/null +++ b/test/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 |