diff options
author | tnut <thierryn1 at hispeed dot ch> | 2010-01-09 17:37:38 +0100 |
---|---|---|
committer | tnut <thierryn1 at hispeed dot ch> | 2010-01-09 17:37:38 +0100 |
commit | c4ec6223b53239882bf30d7e80d2e25f5a249833 (patch) | |
tree | 55a370a894fc0ff32abb23196338c69a1f0827a3 /extra/tomcat/tomcat.install | |
parent | cd5f80ebee2411e399fc40e2db581ebb931d03f0 (diff) | |
parent | aa9524d0b70cb82ece24b454bb39e9b6b0c9f0b8 (diff) | |
download | nutyx-extra-c4ec6223b53239882bf30d7e80d2e25f5a249833.tar.gz nutyx-extra-c4ec6223b53239882bf30d7e80d2e25f5a249833.tar.bz2 nutyx-extra-c4ec6223b53239882bf30d7e80d2e25f5a249833.tar.xz nutyx-extra-c4ec6223b53239882bf30d7e80d2e25f5a249833.zip |
Merge commit 'lesibel/master'
Diffstat (limited to 'extra/tomcat/tomcat.install')
-rwxr-xr-x | extra/tomcat/tomcat.install | 37 |
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 |